Simplify
There's only one call-site for the function, so it seems fine to inline
This commit is contained in:
parent
dc5e5f610c
commit
785887b382
@ -195,12 +195,6 @@ pub struct Resolution {
|
||||
pub import: Option<ImportId>,
|
||||
}
|
||||
|
||||
impl Resolution {
|
||||
fn from_macro(macro_: MacroDefId) -> Self {
|
||||
Resolution { def: PerNs::macros(macro_), import: None }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
struct ResolvePathResult {
|
||||
resolved_def: PerNs,
|
||||
|
@ -182,7 +182,11 @@ where
|
||||
// In Rust, `#[macro_export]` macros are unconditionally visible at the
|
||||
// crate root, even if the parent modules is **not** visible.
|
||||
if export {
|
||||
self.update(self.def_map.root, None, &[(name, Resolution::from_macro(macro_))]);
|
||||
self.update(
|
||||
self.def_map.root,
|
||||
None,
|
||||
&[(name, Resolution { def: PerNs::macros(macro_), import: None })],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user