Struct rustc_resolve::resolve_imports::ImportDirective[][src]

pub struct ImportDirective<'a> {
    pub id: NodeId,
    pub root_id: NodeId,
    pub span: Span,
    pub root_span: Span,
    pub parent: &'a ModuleData<'a>,
    pub module_path: Vec<Ident>,
    pub imported_module: Cell<Option<&'a ModuleData<'a>>>,
    pub subclass: ImportDirectiveSubclass<'a>,
    pub vis: Cell<Visibility>,
    pub expansion: Mark,
    pub used: Cell<bool>,
}
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

One import directive.

Fields

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

The id of the extern crate, UseTree etc that imported this ImportDirective.

In the case where the ImportDirective was expanded from a "nested" use tree, this id is the id of the leaf tree. For example:

This example is not tested
use foo::bar::{a, b}

If this is the import directive for foo::bar::a, we would have the id of the UseTree for a in this field.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

The id of the "root" use-kind -- this is always the same as id except in the case of "nested" use trees, in which case it will be the id of the root use tree. e.g., in the example from id, this would be the id of the use foo::bar UseTree node.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Span of this use tree.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Span of the root use tree (see root_id).

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Methods

impl<'a> ImportDirective<'a>
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Trait Implementations

impl<'a> Debug for ImportDirective<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> Clone for ImportDirective<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<'a> !Send for ImportDirective<'a>

impl<'a> !Sync for ImportDirective<'a>