Struct rustc::traits::auto_trait::AutoTraitFinder[][src]

pub struct AutoTraitFinder<'a, 'tcx: 'a> {
    tcx: &'a TyCtxt<'a, 'tcx, 'tcx>,
}
🔬 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?

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?

Methods

impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx>
[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?

Make a best effort to determine whether and under which conditions an auto trait is implemented for a type. For example, if you have

struct Foo<T> { data: Box<T> }

then this might return that Foo: Send if T: Send (encoded in the AutoTraitResult type). The analysis attempts to account for custom impls as well as other complex cases. This result is intended for use by rustdoc and other such consumers. (Note that due to the coinductive nature of Send, the full and correct result is actually quite simple to generate. That is, when a type has no custom impl, it is Send iff its field types are all Send. So, in our example, we might have that Foo: Send if Box: Send. But this is often not the best way to present to the user.) Warning: The API should be considered highly unstable, and it may be refactored or removed in the future.

impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx>
[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?

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

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

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

Auto Trait Implementations

impl<'a, 'tcx> !Send for AutoTraitFinder<'a, 'tcx>

impl<'a, 'tcx> !Sync for AutoTraitFinder<'a, 'tcx>