pub struct UseLookup {
pub aliases: HashMap<Arc<String>, HashMap<Arc<String>, FnAlias>>,
}
Expand description
Used to resolve calls to imported functions.
Fields§
§aliases: HashMap<Arc<String>, HashMap<Arc<String>, FnAlias>>
Stores namespace aliases. The first key is the alias to namespace. The second key is the alias to the function.
Implementations§
source§impl UseLookup
impl UseLookup
sourcepub fn from_uses_module(uses: &Uses, module: &Module) -> UseLookup
pub fn from_uses_module(uses: &Uses, module: &Module) -> UseLookup
This is called when constructing the AST.
sourcepub fn from_uses_prelude(uses: &Uses, prelude: &Prelude) -> UseLookup
pub fn from_uses_prelude(uses: &Uses, prelude: &Prelude) -> UseLookup
This is called from lifetime/type checker. Here, external functions are treated as loaded.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for UseLookup
impl Send for UseLookup
impl Sync for UseLookup
impl Unpin for UseLookup
impl UnwindSafe for UseLookup
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more