about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2023-07-19 22:37:07 +0530
committerGitHub <noreply@github.com>2023-07-19 22:37:07 +0530
commita47b7b013fb051bdc39c5ff0d7dda4ed4ce8ca57 (patch)
treeb2261a386d6c50c1356f6a6eb7d02859aaa73bb8 /compiler/rustc_session
parentdbb6b1ac31102b5db9777038e2e7393dca93b343 (diff)
parent846cc63e3802171e0e412fadac269bf71c843ef0 (diff)
downloadrust-a47b7b013fb051bdc39c5ff0d7dda4ed4ce8ca57.tar.gz
rust-a47b7b013fb051bdc39c5ff0d7dda4ed4ce8ca57.zip
Rollup merge of #113765 - compiler-errors:at-least, r=oli-obk
Make it clearer that edition functions are `>=`, not `==`

r? `@Nilstrieb`

We could also perhaps derive `Ord` on `Edition` and use comparison operators.
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/session.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index 5be122ffbde..c65d933bd6d 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -995,18 +995,18 @@ impl Session {
     }
 
     /// Are we allowed to use features from the Rust 2018 edition?
-    pub fn rust_2018(&self) -> bool {
-        self.edition().rust_2018()
+    pub fn at_least_rust_2018(&self) -> bool {
+        self.edition().at_least_rust_2018()
     }
 
     /// Are we allowed to use features from the Rust 2021 edition?
-    pub fn rust_2021(&self) -> bool {
-        self.edition().rust_2021()
+    pub fn at_least_rust_2021(&self) -> bool {
+        self.edition().at_least_rust_2021()
     }
 
     /// Are we allowed to use features from the Rust 2024 edition?
-    pub fn rust_2024(&self) -> bool {
-        self.edition().rust_2024()
+    pub fn at_least_rust_2024(&self) -> bool {
+        self.edition().at_least_rust_2024()
     }
 
     /// Returns `true` if we should use the PLT for shared library calls.