Enum rustc_span::edition::Edition
source · pub enum Edition {
Edition2015,
Edition2018,
Edition2021,
Edition2024,
}
Expand description
The edition of the compiler. (See RFC 2052.)
Variants§
Edition2015
The 2015 edition
Edition2018
The 2018 edition
Edition2021
The 2021 edition
Edition2024
The 2024 edition
Implementations§
source§impl Edition
impl Edition
pub fn lint_name(self) -> &'static str
pub fn feature_name(self) -> Symbol
pub fn is_stable(self) -> bool
sourcepub fn is_rust_2015(self) -> bool
pub fn is_rust_2015(self) -> bool
Is this edition 2015?
sourcepub fn at_least_rust_2018(self) -> bool
pub fn at_least_rust_2018(self) -> bool
Are we allowed to use features from the Rust 2018 edition?
sourcepub fn at_least_rust_2021(self) -> bool
pub fn at_least_rust_2021(self) -> bool
Are we allowed to use features from the Rust 2021 edition?
sourcepub fn at_least_rust_2024(self) -> bool
pub fn at_least_rust_2024(self) -> bool
Are we allowed to use features from the Rust 2024 edition?
Trait Implementations§
source§impl<__CTX> HashStable<__CTX> for Editionwhere
__CTX: HashStableContext,
impl<__CTX> HashStable<__CTX> for Editionwhere __CTX: HashStableContext,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
source§impl PartialEq<Edition> for Edition
impl PartialEq<Edition> for Edition
source§impl PartialOrd<Edition> for Edition
impl PartialOrd<Edition> for Edition
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Edition
impl Eq for Edition
impl StructuralEq for Edition
impl StructuralPartialEq for Edition
Auto Trait Implementations§
impl RefUnwindSafe for Edition
impl Send for Edition
impl Sync for Edition
impl Unpin for Edition
impl UnwindSafe for Edition
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
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:
Edition2015
: 0 bytesEdition2018
: 0 bytesEdition2021
: 0 bytesEdition2024
: 0 bytes