add method to construct def site path as a vec of idents
like std_path but used dummy span for all path elements and does not perpend kw:DollarCrate
This commit is contained in:
parent
2c33b070ad
commit
e1010424dc
@ -1043,6 +1043,10 @@ impl<'a> ExtCtxt<'a> {
|
|||||||
.chain(components.iter().map(|&s| Ident::with_dummy_span(s)))
|
.chain(components.iter().map(|&s| Ident::with_dummy_span(s)))
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
pub fn def_site_path(&self, components: &[Symbol]) -> Vec<Ident> {
|
||||||
|
let def_site = self.with_def_site_ctxt(DUMMY_SP);
|
||||||
|
components.iter().map(|&s| Ident::new(s, def_site)).collect()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn check_unused_macros(&mut self) {
|
pub fn check_unused_macros(&mut self) {
|
||||||
self.resolver.check_unused_macros();
|
self.resolver.check_unused_macros();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user