about summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-20 06:41:03 +0000
committerbors <bors@rust-lang.org>2023-07-20 06:41:03 +0000
commite643e0d29f16c8cdd114c3c6e073b131c4e6d5bf (patch)
tree0e0b28f754b343d037f243547756a48cc06a8ec7 /compiler/rustc_span/src
parentf4754ed80c53a3bd125243421065b7af3e7a1faf (diff)
parent7b5b87dee1c21efaf7e4b758991b5498fd07f8a4 (diff)
downloadrust-e643e0d29f16c8cdd114c3c6e073b131c4e6d5bf.tar.gz
rust-e643e0d29f16c8cdd114c3c6e073b131c4e6d5bf.zip
Auto merge of #2987 - rust-lang:rustup-2023-07-20, r=oli-obk
Automatic sync from rustc
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/edition.rs6
-rw-r--r--compiler/rustc_span/src/lib.rs16
2 files changed, 13 insertions, 9 deletions
diff --git a/compiler/rustc_span/src/edition.rs b/compiler/rustc_span/src/edition.rs
index f16db69aae2..608b8c24bde 100644
--- a/compiler/rustc_span/src/edition.rs
+++ b/compiler/rustc_span/src/edition.rs
@@ -82,17 +82,17 @@ impl Edition {
     }
 
     /// Are we allowed to use features from the Rust 2018 edition?
-    pub fn rust_2018(self) -> bool {
+    pub fn at_least_rust_2018(self) -> bool {
         self >= Edition::Edition2018
     }
 
     /// Are we allowed to use features from the Rust 2021 edition?
-    pub fn rust_2021(self) -> bool {
+    pub fn at_least_rust_2021(self) -> bool {
         self >= Edition::Edition2021
     }
 
     /// Are we allowed to use features from the Rust 2024 edition?
-    pub fn rust_2024(self) -> bool {
+    pub fn at_least_rust_2024(self) -> bool {
         self >= Edition::Edition2024
     }
 }
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index 5c56337d1e0..ecaa82874a3 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -707,24 +707,28 @@ impl Span {
         self.ctxt().edition()
     }
 
+    /// Is this edition 2015?
     #[inline]
     pub fn is_rust_2015(self) -> bool {
         self.edition().is_rust_2015()
     }
 
+    /// Are we allowed to use features from the Rust 2018 edition?
     #[inline]
-    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?
     #[inline]
-    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?
     #[inline]
-    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 the source callee.