Use Edition
methods a bit more
This commit is contained in:
parent
dc3e59cb3f
commit
fd5774a4d7
5 changed files with 11 additions and 12 deletions
|
@ -900,22 +900,22 @@ impl Session {
|
|||
}
|
||||
|
||||
pub fn rust_2015(&self) -> bool {
|
||||
self.edition() == Edition::Edition2015
|
||||
self.edition().rust_2015()
|
||||
}
|
||||
|
||||
/// Are we allowed to use features from the Rust 2018 edition?
|
||||
pub fn rust_2018(&self) -> bool {
|
||||
self.edition() >= Edition::Edition2018
|
||||
self.edition().rust_2018()
|
||||
}
|
||||
|
||||
/// Are we allowed to use features from the Rust 2021 edition?
|
||||
pub fn rust_2021(&self) -> bool {
|
||||
self.edition() >= Edition::Edition2021
|
||||
self.edition().rust_2021()
|
||||
}
|
||||
|
||||
/// Are we allowed to use features from the Rust 2024 edition?
|
||||
pub fn rust_2024(&self) -> bool {
|
||||
self.edition() >= Edition::Edition2024
|
||||
self.edition().rust_2024()
|
||||
}
|
||||
|
||||
/// Returns `true` if we cannot skip the PLT for shared library calls.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue