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
Universal(&'a mut Vec<GenericParam>)🔬 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
Existential(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 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
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.
Methods
impl<'a> ImplTraitContext<'a>[src]
impl<'a> ImplTraitContext<'a>fn reborrow<'b>(&'b mut self) -> ImplTraitContext<'b>[src]
fn reborrow<'b>(&'b mut self) -> ImplTraitContext<'b>🔬 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]
impl<'a> Debug for ImplTraitContext<'a>Auto Trait Implementations
impl<'a> !Send for ImplTraitContext<'a>
impl<'a> !Send for ImplTraitContext<'a>impl<'a> !Sync for ImplTraitContext<'a>
impl<'a> !Sync for ImplTraitContext<'a>