pub enum UnstableFeatures {
Disallow,
Allow,
Cheat,
}
Variants§
Disallow
Disallow use of unstable features, as on beta/stable channels.
Allow
Allow use of unstable features, as on nightly.
Cheat
Errors are bypassed for bootstrapping. This is required any time during the build that feature-related lints are set to warn or above because the build turns on warnings-as-errors and uses lots of unstable features. As a result, this is always required for building Rust itself.
Implementations§
source§impl UnstableFeatures
impl UnstableFeatures
sourcepub fn from_environment(krate: Option<&str>) -> Self
pub fn from_environment(krate: Option<&str>) -> Self
This takes into account RUSTC_BOOTSTRAP
.
If krate
is Some
, then setting RUSTC_BOOTSTRAP=krate
will enable the nightly
features. Otherwise, only RUSTC_BOOTSTRAP=1
will work.
pub fn is_nightly_build(&self) -> bool
Trait Implementations§
source§impl Clone for UnstableFeatures
impl Clone for UnstableFeatures
source§fn clone(&self) -> UnstableFeatures
fn clone(&self) -> UnstableFeatures
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UnstableFeatures
impl Debug for UnstableFeatures
source§impl Hash for UnstableFeatures
impl Hash for UnstableFeatures
impl Copy for UnstableFeatures
Auto Trait Implementations§
impl Freeze for UnstableFeatures
impl RefUnwindSafe for UnstableFeatures
impl Send for UnstableFeatures
impl Sync for UnstableFeatures
impl Unpin for UnstableFeatures
impl UnwindSafe for UnstableFeatures
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. 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
Size for each variant:
Disallow
: 0 bytesAllow
: 0 bytesCheat
: 0 bytes