Enum rustc_middle::ty::trait_def::TraitSpecializationKind [−][src]
pub enum TraitSpecializationKind {
None,
Marker,
AlwaysApplicable,
}Expand description
Whether this trait is treated specially by the standard library specialization lint.
Variants
The default. Specializing on this trait is not allowed.
Specializing on this trait is allowed because it doesn’t have any
methods. For example Sized or FusedIterator.
Applies to traits with the rustc_unsafe_specialization_marker
attribute.
Specializing on this trait is allowed because all of the impls of this
trait are “always applicable”. Always applicable means that if
X<'x>: T<'y> for any lifetimes, then for<'a, 'b> X<'a>: T<'b>.
Applies to traits with the rustc_specialization_trait attribute.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TraitSpecializationKindimpl Send for TraitSpecializationKindimpl Sync for TraitSpecializationKindimpl Unpin for TraitSpecializationKindimpl UnwindSafe for TraitSpecializationKindBlanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte