[][src]Struct rustc::infer::opaque_types::OpaqueTypeDecl

pub struct OpaqueTypeDecl<'tcx> {
    pub substs: &'tcx Substs<'tcx>,
    pub concrete_ty: Ty<'tcx>,
    pub has_required_region_bounds: 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?

Information about the opaque, abstract types whose values we are inferring in this function (these are the impl Trait that appear in the return type).

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 substitutions that we apply to the abstract that that this impl Trait desugars to. e.g., if:

fn foo<'a, 'b, T>() -> impl Trait<'a>

winds up desugared to:

abstract type Foo<'x, T>: Trait<'x>
fn foo<'a, 'b, T>() -> Foo<'a, T>

then substs would be ['a, 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?

The type variable that represents the value of the abstract type that we require. In other words, after we compile this function, we will be created a constraint like:

Foo<'a, T> = ?C

where ?C is the value of this type variable. =) It may naturally refer to the type and lifetime parameters in scope in this function, though ultimately it should only reference those that are arguments to Foo in the constraint above. (In other words, ?C should not include 'b, even though it's a lifetime parameter on foo.)

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

True if the impl Trait bounds include region bounds. For example, this would be true for:

fn foo<'a, 'b, 'c>() -> impl Trait<'c> + 'a + 'b

but false for:

fn foo<'c>() -> impl Trait<'c>

unless Trait was declared like:

trait Trait<'c>: 'c

in which case it would be true.

This is used during regionck to decide whether we need to impose any additional constraints to ensure that region variables in concrete_ty wind up being constrained to something from substs (or, at minimum, things that outlive the fn body). (Ultimately, writeback is responsible for this check.)

Trait Implementations

impl<'tcx> Copy for OpaqueTypeDecl<'tcx>
[src]

impl<'tcx> Clone for OpaqueTypeDecl<'tcx>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'tcx> Debug for OpaqueTypeDecl<'tcx>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'tcx> !Send for OpaqueTypeDecl<'tcx>

impl<'tcx> !Sync for OpaqueTypeDecl<'tcx>

Blanket Implementations

impl<T> MaybeResult for T
[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?

impl<'a, T> Captures for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Important traits for &'a mut R

Immutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Important traits for &'a mut R

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<E> SpecializationError for E
[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?

Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S is the encoder/decoder state type, T is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more

impl<T> Erased for T
[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> Erased for T