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
Universal(DefId)
🔬 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
Existential
🔬 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
.
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?
impl Trait
is not accepted in this position.
Trait Implementations
impl Clone for ImplTraitContext
[src]
impl Clone for ImplTraitContext
fn clone(&self) -> ImplTraitContext
[src]
fn clone(&self) -> ImplTraitContext
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for ImplTraitContext
[src]
impl Copy for ImplTraitContext
impl Debug for ImplTraitContext
[src]
impl Debug for ImplTraitContext
Auto Trait Implementations
impl Send for ImplTraitContext
impl Send for ImplTraitContext
impl Sync for ImplTraitContext
impl Sync for ImplTraitContext