Rust: add canonical_path and crate_origin to Item

This commit is contained in:
Paolo Tranquilli
2024-10-22 15:12:47 +02:00
parent 7338eafbd4
commit 194e0daa8c
82 changed files with 852 additions and 144 deletions

View File

@@ -1,2 +1,2 @@
mod.rs 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7
top.rs a77ab900964451c668839aad6827ea539b8932e7c93b54a7987ece0e1bd846ba a77ab900964451c668839aad6827ea539b8932e7c93b54a7987ece0e1bd846ba
top.rs 781f69884739378b8b401f67c795fda457996dc2ee0785ce143dc6d9a2607f13 781f69884739378b8b401f67c795fda457996dc2ee0785ce143dc6d9a2607f13

View File

@@ -5128,6 +5128,15 @@ pub struct Item {
_unused: ()
}
impl Item {
pub fn emit_canonical_path(id: trap::Label<Self>, value: String, out: &mut trap::Writer) {
out.add_tuple("item_canonical_paths", vec![id.into(), value.into()]);
}
pub fn emit_crate_origin(id: trap::Label<Self>, value: String, out: &mut trap::Writer) {
out.add_tuple("item_crate_origins", vec![id.into(), value.into()]);
}
}
impl trap::TrapClass for Item {
fn class_name() -> &'static str { "Item" }
}