pub struct UnstableFeatures {Show 16 fields
all: FxHashSet<Symbol>,
pub lang_items: bool,
pub exhaustive_patterns: bool,
pub generic_associated_type_extended: bool,
pub arbitrary_self_types: bool,
pub arbitrary_self_types_pointers: bool,
pub supertrait_item_shadowing: bool,
pub new_range: bool,
pub never_type_fallback: bool,
pub specialization: bool,
pub min_specialization: bool,
pub ref_pat_eat_one_layer_2024: bool,
pub ref_pat_eat_one_layer_2024_structural: bool,
pub deref_patterns: bool,
pub mut_ref: bool,
pub type_changing_struct_update: bool,
}Fields§
§all: FxHashSet<Symbol>§lang_items: bool§exhaustive_patterns: bool§generic_associated_type_extended: bool§arbitrary_self_types: bool§arbitrary_self_types_pointers: bool§supertrait_item_shadowing: bool§new_range: bool§never_type_fallback: bool§specialization: bool§min_specialization: bool§ref_pat_eat_one_layer_2024: bool§ref_pat_eat_one_layer_2024_structural: bool§deref_patterns: bool§mut_ref: bool§type_changing_struct_update: boolImplementations§
Source§impl UnstableFeatures
impl UnstableFeatures
pub fn is_enabled(&self, feature: &Symbol) -> bool
pub fn iter(&self) -> impl Iterator<Item = Symbol>
pub(crate) fn shrink_to_fit(&mut self)
Source§impl UnstableFeatures
impl UnstableFeatures
Sourcepub fn query<'db>(
db: &'db dyn SourceDatabase,
krate: Crate,
) -> &'db UnstableFeatures
pub fn query<'db>( db: &'db dyn SourceDatabase, krate: Crate, ) -> &'db UnstableFeatures
Query unstable features for a crate.
This is also available as DefMap::features(). Use that if you have a DefMap available.
Otherwise, use this, to not draw a dependency to the def map.
Trait Implementations§
Source§impl Clone for UnstableFeatures
impl Clone for UnstableFeatures
Source§fn clone(&self) -> UnstableFeatures
fn clone(&self) -> UnstableFeatures
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnstableFeatures
impl Debug for UnstableFeatures
Source§impl Default for UnstableFeatures
impl Default for UnstableFeatures
Source§fn default() -> UnstableFeatures
fn default() -> UnstableFeatures
Returns the “default value” for a type. Read more
impl Eq 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 UnsafeUnpin 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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