Enum rustc::hir::lowering::ImplTraitContext[][src]

enum ImplTraitContext<'a> {
    Universal(&'a mut Vec<GenericParam>),
    Existential(DefId),
    Disallowed,
}
🔬 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?

Variants

🔬 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?

Treat impl Trait as shorthand for a new universal generic parameter. Example: fn foo(x: impl Debug), where impl Debug is conceptually equivalent to a fresh universal parameter like fn foo<T: Debug>(x: T).

Newly generated parameters should be inserted into the given Vec

🔬 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?

Treat impl Trait as shorthand for a new universal existential parameter. Example: fn foo() -> impl Debug, where impl Debug is conceptually equivalent to a fresh existential parameter like abstract type T; fn foo() -> T.

We store a DefId here so we can look up necessary information later

🔬 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?

impl Trait is not accepted in this position.

Methods

impl<'a> ImplTraitContext<'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?

Trait Implementations

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

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

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