about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2020-11-30 22:11:29 +0100
committerMara Bos <m-ou.se@m-ou.se>2020-12-31 19:06:09 +0100
commitc574ded57da4c7c631b836c397f31d2a72dc1280 (patch)
tree2e0966db60bf795aeb4ab97310ee7974b0c3600b /src
parentf16ef7d7ce0357d63435201ae51e2c0a6916e07d (diff)
downloadrust-c574ded57da4c7c631b836c397f31d2a72dc1280.tar.gz
rust-c574ded57da4c7c631b836c397f31d2a72dc1280.zip
Consistently call editions "Rust 20xx" in messages.
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/async-await/edition-deny-async-fns-2015.rs18
-rw-r--r--src/test/ui/async-await/edition-deny-async-fns-2015.stderr18
-rw-r--r--src/test/ui/editions/async-block-2015.rs8
-rw-r--r--src/test/ui/editions/async-block-2015.stderr8
-rw-r--r--src/test/ui/try-block/try-block-in-edition2015.stderr2
5 files changed, 27 insertions, 27 deletions
diff --git a/src/test/ui/async-await/edition-deny-async-fns-2015.rs b/src/test/ui/async-await/edition-deny-async-fns-2015.rs
index 5d2d186137e..e5dc9c8a5fe 100644
--- a/src/test/ui/async-await/edition-deny-async-fns-2015.rs
+++ b/src/test/ui/async-await/edition-deny-async-fns-2015.rs
@@ -1,21 +1,21 @@
 // edition:2015
 
-async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition
+async fn foo() {} //~ ERROR `async fn` is not permitted in Rust 2015
 
-fn baz() { async fn foo() {} } //~ ERROR `async fn` is not permitted in the 2015 edition
+fn baz() { async fn foo() {} } //~ ERROR `async fn` is not permitted in Rust 2015
 
-async fn async_baz() { //~ ERROR `async fn` is not permitted in the 2015 edition
-    async fn bar() {} //~ ERROR `async fn` is not permitted in the 2015 edition
+async fn async_baz() { //~ ERROR `async fn` is not permitted in Rust 2015
+    async fn bar() {} //~ ERROR `async fn` is not permitted in Rust 2015
 }
 
 struct Foo {}
 
 impl Foo {
-    async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition
+    async fn foo() {} //~ ERROR `async fn` is not permitted in Rust 2015
 }
 
 trait Bar {
-    async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition
+    async fn foo() {} //~ ERROR `async fn` is not permitted in Rust 2015
                       //~^ ERROR functions in traits cannot be declared `async`
 }
 
@@ -23,16 +23,16 @@ fn main() {
     macro_rules! accept_item { ($x:item) => {} }
 
     accept_item! {
-        async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition
+        async fn foo() {} //~ ERROR `async fn` is not permitted in Rust 2015
     }
 
     accept_item! {
         impl Foo {
-            async fn bar() {} //~ ERROR `async fn` is not permitted in the 2015 edition
+            async fn bar() {} //~ ERROR `async fn` is not permitted in Rust 2015
         }
     }
 
     let inside_closure = || {
-        async fn bar() {} //~ ERROR `async fn` is not permitted in the 2015 edition
+        async fn bar() {} //~ ERROR `async fn` is not permitted in Rust 2015
     };
 }
diff --git a/src/test/ui/async-await/edition-deny-async-fns-2015.stderr b/src/test/ui/async-await/edition-deny-async-fns-2015.stderr
index 39bc8e7be8f..43364a8e858 100644
--- a/src/test/ui/async-await/edition-deny-async-fns-2015.stderr
+++ b/src/test/ui/async-await/edition-deny-async-fns-2015.stderr
@@ -1,4 +1,4 @@
-error[E0670]: `async fn` is not permitted in the 2015 edition
+error[E0670]: `async fn` is not permitted in Rust 2015
   --> $DIR/edition-deny-async-fns-2015.rs:3:1
    |
 LL | async fn foo() {}
@@ -7,7 +7,7 @@ LL | async fn foo() {}
    = help: set `edition = "2018"` in `Cargo.toml`
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
-error[E0670]: `async fn` is not permitted in the 2015 edition
+error[E0670]: `async fn` is not permitted in Rust 2015
   --> $DIR/edition-deny-async-fns-2015.rs:5:12
    |
 LL | fn baz() { async fn foo() {} }
@@ -16,7 +16,7 @@ LL | fn baz() { async fn foo() {} }
    = help: set `edition = "2018"` in `Cargo.toml`
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
-error[E0670]: `async fn` is not permitted in the 2015 edition
+error[E0670]: `async fn` is not permitted in Rust 2015
   --> $DIR/edition-deny-async-fns-2015.rs:7:1
    |
 LL | async fn async_baz() {
@@ -25,7 +25,7 @@ LL | async fn async_baz() {
    = help: set `edition = "2018"` in `Cargo.toml`
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
-error[E0670]: `async fn` is not permitted in the 2015 edition
+error[E0670]: `async fn` is not permitted in Rust 2015
   --> $DIR/edition-deny-async-fns-2015.rs:8:5
    |
 LL |     async fn bar() {}
@@ -34,7 +34,7 @@ LL |     async fn bar() {}
    = help: set `edition = "2018"` in `Cargo.toml`
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
-error[E0670]: `async fn` is not permitted in the 2015 edition
+error[E0670]: `async fn` is not permitted in Rust 2015
   --> $DIR/edition-deny-async-fns-2015.rs:14:5
    |
 LL |     async fn foo() {}
@@ -43,7 +43,7 @@ LL |     async fn foo() {}
    = help: set `edition = "2018"` in `Cargo.toml`
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
-error[E0670]: `async fn` is not permitted in the 2015 edition
+error[E0670]: `async fn` is not permitted in Rust 2015
   --> $DIR/edition-deny-async-fns-2015.rs:18:5
    |
 LL |     async fn foo() {}
@@ -52,7 +52,7 @@ LL |     async fn foo() {}
    = help: set `edition = "2018"` in `Cargo.toml`
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
-error[E0670]: `async fn` is not permitted in the 2015 edition
+error[E0670]: `async fn` is not permitted in Rust 2015
   --> $DIR/edition-deny-async-fns-2015.rs:36:9
    |
 LL |         async fn bar() {}
@@ -61,7 +61,7 @@ LL |         async fn bar() {}
    = help: set `edition = "2018"` in `Cargo.toml`
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
-error[E0670]: `async fn` is not permitted in the 2015 edition
+error[E0670]: `async fn` is not permitted in Rust 2015
   --> $DIR/edition-deny-async-fns-2015.rs:26:9
    |
 LL |         async fn foo() {}
@@ -70,7 +70,7 @@ LL |         async fn foo() {}
    = help: set `edition = "2018"` in `Cargo.toml`
    = note: for more on editions, read https://doc.rust-lang.org/edition-guide
 
-error[E0670]: `async fn` is not permitted in the 2015 edition
+error[E0670]: `async fn` is not permitted in Rust 2015
   --> $DIR/edition-deny-async-fns-2015.rs:31:13
    |
 LL |             async fn bar() {}
diff --git a/src/test/ui/editions/async-block-2015.rs b/src/test/ui/editions/async-block-2015.rs
index b35cc1564b3..92eae9e3c14 100644
--- a/src/test/ui/editions/async-block-2015.rs
+++ b/src/test/ui/editions/async-block-2015.rs
@@ -1,13 +1,13 @@
 async fn foo() {
-//~^ ERROR `async fn` is not permitted in the 2015 edition
+//~^ ERROR `async fn` is not permitted in Rust 2015
 //~| NOTE to use `async fn`, switch to Rust 2018 or later
 //~| HELP set `edition = "2018"` in `Cargo.toml`
 //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
 
     let x = async {};
     //~^ ERROR cannot find struct, variant or union type `async` in this scope
-    //~| NOTE `async` blocks are only allowed in the 2018 edition
-    let y = async { //~ NOTE `async` blocks are only allowed in edition 2018 or later
+    //~| NOTE `async` blocks are only allowed in Rust 2018 or later
+    let y = async { //~ NOTE `async` blocks are only allowed in Rust 2018 or later
         let x = 42;
         //~^ ERROR expected identifier, found keyword `let`
         //~| NOTE expected identifier, found keyword
@@ -15,7 +15,7 @@ async fn foo() {
         //~| NOTE for more on editions, read https://doc.rust-lang.org/edition-guide
         42
     };
-    let z = async { //~ NOTE `async` blocks are only allowed in edition 2018 or later
+    let z = async { //~ NOTE `async` blocks are only allowed in Rust 2018 or later
         42
         //~^ ERROR expected identifier, found `42`
         //~| NOTE expected identifier
diff --git a/src/test/ui/editions/async-block-2015.stderr b/src/test/ui/editions/async-block-2015.stderr
index d65761d79ff..e42747c804c 100644
--- a/src/test/ui/editions/async-block-2015.stderr
+++ b/src/test/ui/editions/async-block-2015.stderr
@@ -1,4 +1,4 @@
-error[E0670]: `async fn` is not permitted in the 2015 edition
+error[E0670]: `async fn` is not permitted in Rust 2015
   --> $DIR/async-block-2015.rs:1:1
    |
 LL | async fn foo() {
@@ -11,7 +11,7 @@ error: expected identifier, found keyword `let`
   --> $DIR/async-block-2015.rs:11:9
    |
 LL |     let y = async {
-   |             ----- `async` blocks are only allowed in edition 2018 or later
+   |             ----- `async` blocks are only allowed in Rust 2018 or later
 LL |         let x = 42;
    |         ^^^ expected identifier, found keyword
    |
@@ -22,7 +22,7 @@ error: expected identifier, found `42`
   --> $DIR/async-block-2015.rs:19:9
    |
 LL |     let z = async {
-   |             ----- `async` blocks are only allowed in edition 2018 or later
+   |             ----- `async` blocks are only allowed in Rust 2018 or later
 LL |         42
    |         ^^ expected identifier
    |
@@ -33,7 +33,7 @@ error[E0422]: cannot find struct, variant or union type `async` in this scope
   --> $DIR/async-block-2015.rs:7:13
    |
 LL |     let x = async {};
-   |             ^^^^^ `async` blocks are only allowed in the 2018 edition
+   |             ^^^^^ `async` blocks are only allowed in Rust 2018 or later
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/try-block/try-block-in-edition2015.stderr b/src/test/ui/try-block/try-block-in-edition2015.stderr
index 78cdfb2cc7f..0f3c14b1386 100644
--- a/src/test/ui/try-block/try-block-in-edition2015.stderr
+++ b/src/test/ui/try-block/try-block-in-edition2015.stderr
@@ -13,7 +13,7 @@ error[E0574]: expected struct, variant or union type, found macro `try`
 LL |     let try_result: Option<_> = try {
    |                                 ^^^ not a struct, variant or union type
    |
-   = note: if you want the `try` keyword, you need to be in the 2018 edition
+   = note: if you want the `try` keyword, you need Rust 2018 or later
 help: use `!` to invoke the macro
    |
 LL |     let try_result: Option<_> = try! {