]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_session/src/session.rs
Auto merge of #107546 - matthiaskrgr:rollup-9rgf2gx, r=matthiaskrgr
[rust.git] / compiler / rustc_session / src / session.rs
index 7cf9b0fd1fa09d2ba04fc1a794b51ff7d4dabdbc..746e0f169bcf30ca37971009f60aabce0cc5b481 100644 (file)
@@ -918,23 +918,24 @@ pub fn consider_optimizing<T: Fn() -> String>(&self, crate_name: &str, msg: T) -
         ret
     }
 
+    /// Is this edition 2015?
     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.