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

enum ImplTraitContext {
    Universal(DefId),
    Existential,
    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).

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?

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.

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

Trait Implementations

impl Clone for ImplTraitContext
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for ImplTraitContext
[src]

impl Debug for ImplTraitContext
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for ImplTraitContext

impl Sync for ImplTraitContext