pub struct Features {
pub adt_const_params: bool,
pub generic_const_exprs: bool,
pub register_tool: bool,
pub auto_traits: bool,
pub negative_impls: bool,
pub registered_tools: HashSet<String>,
}
Expand description
A subset of rustc_feature::Features
that is relevant to us
Fields§
§adt_const_params: bool
§generic_const_exprs: bool
§register_tool: bool
§auto_traits: bool
§negative_impls: bool
§registered_tools: HashSet<String>
Implementations§
Source§impl Features
impl Features
pub fn into_iter(&self) -> impl Iterator<Item = String>
Sourcepub fn detect(options: &Options, rustc_args: &Vec<String>) -> Self
pub fn detect(options: &Options, rustc_args: &Vec<String>) -> Self
Runs Rustc with a driver that only collects which unstable Rustc features are enabled
Sourcepub fn detect_forking() -> Self
pub fn detect_forking() -> Self
Just like detect
, but wraps the call in a subprocess so that
we can capture stdout
and stderr
: we don’t want the use to
see error message from Rustc twice, or Cargo to have to parse
Rustc messages twice.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Features
impl<'de> Deserialize<'de> for Features
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Features
impl RefUnwindSafe for Features
impl Send for Features
impl Sync for Features
impl Unpin for Features
impl UnwindSafe for Features
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more