]> git.lizzy.rs Git - rust.git/commitdiff
Remove the `proc` keyword again
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Sun, 13 May 2018 13:35:52 +0000 (16:35 +0300)
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>
Thu, 17 May 2018 20:13:09 +0000 (23:13 +0300)
25 files changed:
src/libsyntax_pos/symbol.rs
src/test/run-pass/auxiliary/edition-kw-macro-2015.rs
src/test/run-pass/auxiliary/edition-kw-macro-2018.rs
src/test/run-pass/edition-keywords-2015-2015.rs
src/test/run-pass/edition-keywords-2015-2018.rs
src/test/run-pass/edition-keywords-2018-2015.rs
src/test/run-pass/edition-keywords-2018-2018.rs
src/test/ui/auxiliary/edition-kw-macro-2015.rs
src/test/ui/auxiliary/edition-kw-macro-2018.rs
src/test/ui/edition-keywords-2015-2015-expansion.rs
src/test/ui/edition-keywords-2015-2015-expansion.stderr [deleted file]
src/test/ui/edition-keywords-2015-2015-parsing.rs
src/test/ui/edition-keywords-2015-2015-parsing.stderr
src/test/ui/edition-keywords-2015-2018-expansion.rs
src/test/ui/edition-keywords-2015-2018-expansion.stderr
src/test/ui/edition-keywords-2015-2018-parsing.rs
src/test/ui/edition-keywords-2015-2018-parsing.stderr
src/test/ui/edition-keywords-2018-2015-expansion.rs
src/test/ui/edition-keywords-2018-2015-expansion.stderr [deleted file]
src/test/ui/edition-keywords-2018-2015-parsing.rs
src/test/ui/edition-keywords-2018-2015-parsing.stderr
src/test/ui/edition-keywords-2018-2018-expansion.rs
src/test/ui/edition-keywords-2018-2018-expansion.stderr
src/test/ui/edition-keywords-2018-2018-parsing.rs
src/test/ui/edition-keywords-2018-2018-parsing.stderr

index 35c94457e6ef5fe62236ebe7e92c269733420bcf..a08f9b2e54a7c63065584879539da96a273cf8fe 100644 (file)
@@ -386,25 +386,20 @@ pub fn fresh() -> Self {
 
     // Edition-specific keywords reserved for future use.
     (55, Async,              "async") // >= 2018 Edition Only
-    (56, Proc,               "proc") // <= 2015 Edition Only
 
     // Special lifetime names
-    (57, UnderscoreLifetime, "'_")
-    (58, StaticLifetime,     "'static")
+    (56, UnderscoreLifetime, "'_")
+    (57, StaticLifetime,     "'static")
 
     // Weak keywords, have special meaning only in specific contexts.
-    (59, Auto,               "auto")
-    (60, Catch,              "catch")
-    (61, Default,            "default")
-    (62, Dyn,                "dyn")
-    (63, Union,              "union")
+    (58, Auto,               "auto")
+    (59, Catch,              "catch")
+    (60, Default,            "default")
+    (61, Dyn,                "dyn")
+    (62, Union,              "union")
 }
 
 impl Symbol {
-    fn is_unused_keyword_2015(self) -> bool {
-        self == keywords::Proc.name()
-    }
-
     fn is_unused_keyword_2018(self) -> bool {
         self == keywords::Async.name()
     }
@@ -426,7 +421,6 @@ pub fn is_used_keyword(self) -> bool {
     pub fn is_unused_keyword(self) -> bool {
         // Note: `span.edition()` is relatively expensive, don't call it unless necessary.
         self.name >= keywords::Abstract.name() && self.name <= keywords::Yield.name() ||
-        self.name.is_unused_keyword_2015() && self.span.edition() == Edition::Edition2015 ||
         self.name.is_unused_keyword_2018() && self.span.edition() == Edition::Edition2018
     }
 
index 1dc0562a9f018814e68bcff7cabd7c746e32e674..9127c8e350a8cc2bb2e98d3e909fa1d89ce6cdd8 100644 (file)
@@ -12,7 +12,6 @@
 
 #![feature(raw_identifiers)]
 
-// `async`
 #[macro_export]
 macro_rules! produces_async {
     () => (pub fn async() {})
@@ -37,29 +36,3 @@ macro_rules! consumes_async_raw {
 macro_rules! passes_ident {
     ($i: ident) => ($i)
 }
-
-// `proc`
-#[macro_export]
-macro_rules! produces_proc {
-    () => (pub fn proc() {})
-}
-
-#[macro_export]
-macro_rules! produces_proc_raw {
-    () => (pub fn r#proc() {})
-}
-
-#[macro_export]
-macro_rules! consumes_proc {
-    (proc) => (1)
-}
-
-#[macro_export]
-macro_rules! consumes_proc_raw {
-    (r#proc) => (1)
-}
-
-#[macro_export]
-macro_rules! passes_ident {
-    ($i: ident) => ($i)
-}
index fb018a36231ccc6c0ae922cfc4540d1b12171eae..4fef77d67ea71de1d1371cf271773540e8453a26 100644 (file)
@@ -12,7 +12,6 @@
 
 #![feature(raw_identifiers)]
 
-// `async`
 #[macro_export]
 macro_rules! produces_async {
     () => (pub fn async() {})
@@ -37,29 +36,3 @@ macro_rules! consumes_async_raw {
 macro_rules! passes_ident {
     ($i: ident) => ($i)
 }
-
-// `proc`
-#[macro_export]
-macro_rules! produces_proc {
-    () => (pub fn proc() {})
-}
-
-#[macro_export]
-macro_rules! produces_proc_raw {
-    () => (pub fn r#proc() {})
-}
-
-#[macro_export]
-macro_rules! consumes_proc {
-    (proc) => (1)
-}
-
-#[macro_export]
-macro_rules! consumes_proc_raw {
-    (r#proc) => (1)
-}
-
-#[macro_export]
-macro_rules! passes_ident {
-    ($i: ident) => ($i)
-}
index b66d35cfc375248fa63fbddd3f43d571eedb686a..41480bb978ec2f9d30bfde1700c2dae192960094 100644 (file)
@@ -16,7 +16,6 @@
 #[macro_use]
 extern crate edition_kw_macro_2015;
 
-// `async`
 pub fn check_async() {
     let mut async = 1; // OK
     let mut r#async = 1; // OK
@@ -41,29 +40,4 @@ mod two_async {
     produces_async_raw! {} // OK
 }
 
-// `proc`
-pub fn check_proc() {
-    // let mut proc = 1; // ERROR, reserved
-    let mut r#proc = 1; // OK
-
-    r#proc = consumes_proc!(proc); // OK
-    // r#proc = consumes_proc!(r#proc); // ERROR, not a match
-    // r#proc = consumes_proc_raw!(proc); // ERROR, not a match
-    r#proc = consumes_proc_raw!(r#proc); // OK
-
-    // if passes_ident!(proc) == 1 {} // ERROR, reserved
-    if passes_ident!(r#proc) == 1 {} // OK
-    // one_proc::proc(); // ERROR, reserved
-    // one_proc::r#proc(); // ERROR, unresolved name
-    // two_proc::proc(); // ERROR, reserved
-    two_proc::r#proc(); // OK
-}
-
-mod one_proc {
-    // produces_proc! {} // ERROR, reserved
-}
-mod two_proc {
-    produces_proc_raw! {} // OK
-}
-
 fn main() {}
index ae2083427725a84c6b4e2f2f54ee09b868797a53..78835d510639f06481a65d409e515a09a399d13c 100644 (file)
@@ -16,7 +16,6 @@
 #[macro_use]
 extern crate edition_kw_macro_2018;
 
-// `async`
 pub fn check_async() {
     let mut async = 1; // OK
     let mut r#async = 1; // OK
@@ -41,29 +40,4 @@ mod two_async {
     produces_async_raw! {} // OK
 }
 
-// `proc`
-pub fn check_proc() {
-    // let mut proc = 1; // ERROR, reserved
-    let mut r#proc = 1; // OK
-
-    r#proc = consumes_proc!(proc); // OK
-    // r#proc = consumes_proc!(r#proc); // ERROR, not a match
-    // r#proc = consumes_proc_raw!(proc); // ERROR, not a match
-    r#proc = consumes_proc_raw!(r#proc); // OK
-
-    // if passes_ident!(proc) == 1 {} // ERROR, reserved
-    if passes_ident!(r#proc) == 1 {} // OK
-    // one_proc::proc(); // ERROR, reserved
-    one_proc::r#proc(); // OK
-    // two_proc::proc(); // ERROR, reserved
-    two_proc::r#proc(); // OK
-}
-
-mod one_proc {
-    produces_proc! {} // OK
-}
-mod two_proc {
-    produces_proc_raw! {} // OK
-}
-
 fn main() {}
index b70ccd6b0f4daf0124aaef51b707281662390daf..46d5f222cbb3179ec566611f1ef6399df79f9186 100644 (file)
@@ -16,7 +16,6 @@
 #[macro_use]
 extern crate edition_kw_macro_2015;
 
-// `async`
 pub fn check_async() {
     // let mut async = 1; // ERROR, reserved
     let mut r#async = 1; // OK
@@ -41,29 +40,4 @@ mod two_async {
     produces_async_raw! {} // OK
 }
 
-// `proc`
-pub fn check_proc() {
-    let mut proc = 1; // OK
-    let mut r#proc = 1; // OK
-
-    r#proc = consumes_proc!(proc); // OK
-    // r#proc = consumes_proc!(r#proc); // ERROR, not a match
-    // r#proc = consumes_proc_raw!(proc); // ERROR, not a match
-    r#proc = consumes_proc_raw!(r#proc); // OK
-
-    if passes_ident!(proc) == 1 {} // OK
-    if passes_ident!(r#proc) == 1 {} // OK
-    // one_proc::proc(); // ERROR, unresolved name
-    // one_proc::r#proc(); // ERROR, unresolved name
-    two_proc::proc(); // OK
-    two_proc::r#proc(); // OK
-}
-
-mod one_proc {
-    // produces_proc! {} // ERROR, reserved
-}
-mod two_proc {
-    produces_proc_raw! {} // OK
-}
-
 fn main() {}
index e3da165eb353f1551ecf560c0ef65bb6ece783b9..06482988937b667e88feed720588ac0d36cfcb09 100644 (file)
@@ -16,7 +16,6 @@
 #[macro_use]
 extern crate edition_kw_macro_2018;
 
-// `async`
 pub fn check_async() {
     // let mut async = 1; // ERROR, reserved
     let mut r#async = 1; // OK
@@ -41,29 +40,4 @@ mod two_async {
     produces_async_raw! {} // OK
 }
 
-// `proc`
-pub fn check_proc() {
-    let mut proc = 1; // OK
-    let mut r#proc = 1; // OK
-
-    r#proc = consumes_proc!(proc); // OK
-    // r#proc = consumes_proc!(r#proc); // ERROR, not a match
-    // r#proc = consumes_proc_raw!(proc); // ERROR, not a match
-    r#proc = consumes_proc_raw!(r#proc); // OK
-
-    if passes_ident!(proc) == 1 {} // OK
-    if passes_ident!(r#proc) == 1 {} // OK
-    one_proc::proc(); // OK
-    one_proc::r#proc(); // OK
-    two_proc::proc(); // OK
-    two_proc::r#proc(); // OK
-}
-
-mod one_proc {
-    produces_proc! {} // OK
-}
-mod two_proc {
-    produces_proc_raw! {} // OK
-}
-
 fn main() {}
index 1dc0562a9f018814e68bcff7cabd7c746e32e674..9127c8e350a8cc2bb2e98d3e909fa1d89ce6cdd8 100644 (file)
@@ -12,7 +12,6 @@
 
 #![feature(raw_identifiers)]
 
-// `async`
 #[macro_export]
 macro_rules! produces_async {
     () => (pub fn async() {})
@@ -37,29 +36,3 @@ macro_rules! consumes_async_raw {
 macro_rules! passes_ident {
     ($i: ident) => ($i)
 }
-
-// `proc`
-#[macro_export]
-macro_rules! produces_proc {
-    () => (pub fn proc() {})
-}
-
-#[macro_export]
-macro_rules! produces_proc_raw {
-    () => (pub fn r#proc() {})
-}
-
-#[macro_export]
-macro_rules! consumes_proc {
-    (proc) => (1)
-}
-
-#[macro_export]
-macro_rules! consumes_proc_raw {
-    (r#proc) => (1)
-}
-
-#[macro_export]
-macro_rules! passes_ident {
-    ($i: ident) => ($i)
-}
index fb018a36231ccc6c0ae922cfc4540d1b12171eae..4fef77d67ea71de1d1371cf271773540e8453a26 100644 (file)
@@ -12,7 +12,6 @@
 
 #![feature(raw_identifiers)]
 
-// `async`
 #[macro_export]
 macro_rules! produces_async {
     () => (pub fn async() {})
@@ -37,29 +36,3 @@ macro_rules! consumes_async_raw {
 macro_rules! passes_ident {
     ($i: ident) => ($i)
 }
-
-// `proc`
-#[macro_export]
-macro_rules! produces_proc {
-    () => (pub fn proc() {})
-}
-
-#[macro_export]
-macro_rules! produces_proc_raw {
-    () => (pub fn r#proc() {})
-}
-
-#[macro_export]
-macro_rules! consumes_proc {
-    (proc) => (1)
-}
-
-#[macro_export]
-macro_rules! consumes_proc_raw {
-    (r#proc) => (1)
-}
-
-#[macro_export]
-macro_rules! passes_ident {
-    ($i: ident) => ($i)
-}
index 13d95e6751eca2270cf42f08d85bbfe0d94ae0f6..b8a1994a10575fff29a8491788aacfda3e43669a 100644 (file)
 
 // compile-flags: --edition=2015
 // aux-build:edition-kw-macro-2015.rs
+// compile-pass
 
 #![feature(raw_identifiers)]
 
 #[macro_use]
 extern crate edition_kw_macro_2015;
 
-// `async`
 mod one_async {
     produces_async! {} // OK
 }
@@ -24,10 +24,4 @@ mod two_async {
     produces_async_raw! {} // OK
 }
 
-// `proc`
-mod one_proc {
-    produces_proc! {} // ERROR expected identifier, found reserved keyword `proc`
-}
-mod two_proc {
-    produces_proc_raw! {} // OK
-}
+fn main() {}
diff --git a/src/test/ui/edition-keywords-2015-2015-expansion.stderr b/src/test/ui/edition-keywords-2015-2015-expansion.stderr
deleted file mode 100644 (file)
index dd4a35c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-error: expected identifier, found reserved keyword `proc`
-  --> $DIR/edition-keywords-2015-2015-expansion.rs:29:5
-   |
-LL |     produces_proc! {} // ERROR expected identifier, found reserved keyword `proc`
-   |     ^^^^^^^^^^^^^^^^^ expected identifier, found reserved keyword
-   |
-   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
-
-error: aborting due to previous error
-
index 1f8390796d3163dd492950cc36962b2d13c1453e..1fb91ca006cc7ba2a3e6a910415e08d6ecedf53a 100644 (file)
@@ -16,7 +16,6 @@
 #[macro_use]
 extern crate edition_kw_macro_2015;
 
-// `async`
 pub fn check_async() {
     let mut async = 1; // OK
     let mut r#async = 1; // OK
@@ -31,19 +30,3 @@ pub fn check_async() {
     module::async(); // OK
     module::r#async(); // OK
 }
-
-// `proc`
-pub fn check_proc() {
-    let mut proc = 1; //~ ERROR expected identifier, found reserved keyword `proc`
-    let mut r#proc = 1; // OK
-
-    r#proc = consumes_proc!(proc); // OK
-    r#proc = consumes_proc!(r#proc); //~ ERROR no rules expected the token `r#proc`
-    r#proc = consumes_proc_raw!(proc); //~ ERROR no rules expected the token `proc`
-    r#proc = consumes_proc_raw!(r#proc); // OK
-
-    if passes_ident!(proc) == 1 {} //~ ERROR expected expression, found reserved keyword `proc`
-    if passes_ident!(r#proc) == 1 {} // OK
-    module::proc(); //~ ERROR expected identifier, found reserved keyword `proc`
-    module::r#proc(); // OK
-}
index c40de006edc384af95caea38f2004f7752fe4f85..5b6fd3e1c9c434c8fa24c4a60348fc482fb991ab 100644 (file)
@@ -1,44 +1,14 @@
-error: expected identifier, found reserved keyword `proc`
-  --> $DIR/edition-keywords-2015-2015-parsing.rs:37:13
-   |
-LL |     let mut proc = 1; //~ ERROR expected identifier, found reserved keyword `proc`
-   |             ^^^^ expected identifier, found reserved keyword
-
-error: expected identifier, found reserved keyword `proc`
-  --> $DIR/edition-keywords-2015-2015-parsing.rs:47:13
-   |
-LL |     module::proc(); //~ ERROR expected identifier, found reserved keyword `proc`
-   |             ^^^^ expected identifier, found reserved keyword
-
 error: no rules expected the token `r#async`
-  --> $DIR/edition-keywords-2015-2015-parsing.rs:25:31
+  --> $DIR/edition-keywords-2015-2015-parsing.rs:24:31
    |
 LL |     r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async`
    |                               ^^^^^^^
 
 error: no rules expected the token `async`
-  --> $DIR/edition-keywords-2015-2015-parsing.rs:26:35
+  --> $DIR/edition-keywords-2015-2015-parsing.rs:25:35
    |
 LL |     r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
    |                                   ^^^^^
 
-error: no rules expected the token `r#proc`
-  --> $DIR/edition-keywords-2015-2015-parsing.rs:41:29
-   |
-LL |     r#proc = consumes_proc!(r#proc); //~ ERROR no rules expected the token `r#proc`
-   |                             ^^^^^^
-
-error: no rules expected the token `proc`
-  --> $DIR/edition-keywords-2015-2015-parsing.rs:42:33
-   |
-LL |     r#proc = consumes_proc_raw!(proc); //~ ERROR no rules expected the token `proc`
-   |                                 ^^^^
-
-error: expected expression, found reserved keyword `proc`
-  --> $DIR/edition-keywords-2015-2015-parsing.rs:45:22
-   |
-LL |     if passes_ident!(proc) == 1 {} //~ ERROR expected expression, found reserved keyword `proc`
-   |                      ^^^^ expected expression
-
-error: aborting due to 7 previous errors
+error: aborting due to 2 previous errors
 
index 59117184686b1593d3345de2ac2b52d12c1f3972..bc14c104c49fccbd2b014c865ad3e19afbd4856c 100644 (file)
 #[macro_use]
 extern crate edition_kw_macro_2018;
 
-// `async`
 mod one_async {
     produces_async! {} // ERROR expected identifier, found reserved keyword
 }
 mod two_async {
     produces_async_raw! {} // OK
 }
-
-// `proc`
-mod one_proc {
-    produces_proc! {} // OK
-}
-mod two_proc {
-    produces_proc_raw! {} // OK
-}
index a1716efb5375475eb677f435228a99dc6639817f..13c4ee82537582816fb1bdf231a32d2efb3ad185 100644 (file)
@@ -1,5 +1,5 @@
 error: expected identifier, found reserved keyword `async`
-  --> $DIR/edition-keywords-2015-2018-expansion.rs:21:5
+  --> $DIR/edition-keywords-2015-2018-expansion.rs:20:5
    |
 LL |     produces_async! {} // ERROR expected identifier, found reserved keyword
    |     ^^^^^^^^^^^^^^^^^^ expected identifier, found reserved keyword
index 6405a94f842b9a2afcdd1a942414146098f8c186..0b680eb16c7f458795e571f0ef3ca14bd96dbf3d 100644 (file)
@@ -16,7 +16,6 @@
 #[macro_use]
 extern crate edition_kw_macro_2018;
 
-// `async`
 pub fn check_async() {
     let mut async = 1; // OK
     let mut r#async = 1; // OK
@@ -31,19 +30,3 @@ pub fn check_async() {
     module::async(); // OK
     module::r#async(); // OK
 }
-
-// `proc`
-pub fn check_proc() {
-    let mut proc = 1; //~ ERROR expected identifier, found reserved keyword `proc`
-    let mut r#proc = 1; // OK
-
-    r#proc = consumes_proc!(proc); // OK
-    r#proc = consumes_proc!(r#proc); //~ ERROR no rules expected the token `r#proc`
-    r#proc = consumes_proc_raw!(proc); //~ ERROR no rules expected the token `proc`
-    r#proc = consumes_proc_raw!(r#proc); // OK
-
-    if passes_ident!(proc) == 1 {} //~ ERROR expected expression, found reserved keyword `proc`
-    if passes_ident!(r#proc) == 1 {} // OK
-    module::proc(); //~ ERROR expected identifier, found reserved keyword `proc`
-    module::r#proc(); // OK
-}
index 3510f898025c1d525f627f5698787b426795ab26..60cfbce3ff0e49bdd4e85a3143499e44f77edc06 100644 (file)
@@ -1,44 +1,14 @@
-error: expected identifier, found reserved keyword `proc`
-  --> $DIR/edition-keywords-2015-2018-parsing.rs:37:13
-   |
-LL |     let mut proc = 1; //~ ERROR expected identifier, found reserved keyword `proc`
-   |             ^^^^ expected identifier, found reserved keyword
-
-error: expected identifier, found reserved keyword `proc`
-  --> $DIR/edition-keywords-2015-2018-parsing.rs:47:13
-   |
-LL |     module::proc(); //~ ERROR expected identifier, found reserved keyword `proc`
-   |             ^^^^ expected identifier, found reserved keyword
-
 error: no rules expected the token `r#async`
-  --> $DIR/edition-keywords-2015-2018-parsing.rs:25:31
+  --> $DIR/edition-keywords-2015-2018-parsing.rs:24:31
    |
 LL |     r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async`
    |                               ^^^^^^^
 
 error: no rules expected the token `async`
-  --> $DIR/edition-keywords-2015-2018-parsing.rs:26:35
+  --> $DIR/edition-keywords-2015-2018-parsing.rs:25:35
    |
 LL |     r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
    |                                   ^^^^^
 
-error: no rules expected the token `r#proc`
-  --> $DIR/edition-keywords-2015-2018-parsing.rs:41:29
-   |
-LL |     r#proc = consumes_proc!(r#proc); //~ ERROR no rules expected the token `r#proc`
-   |                             ^^^^^^
-
-error: no rules expected the token `proc`
-  --> $DIR/edition-keywords-2015-2018-parsing.rs:42:33
-   |
-LL |     r#proc = consumes_proc_raw!(proc); //~ ERROR no rules expected the token `proc`
-   |                                 ^^^^
-
-error: expected expression, found reserved keyword `proc`
-  --> $DIR/edition-keywords-2015-2018-parsing.rs:45:22
-   |
-LL |     if passes_ident!(proc) == 1 {} //~ ERROR expected expression, found reserved keyword `proc`
-   |                      ^^^^ expected expression
-
-error: aborting due to 7 previous errors
+error: aborting due to 2 previous errors
 
index 04de1018f15884fb0bb97b565adfdd4f55df4d24..6f85f427eb0543dda421dfa48b36d2c635a9503e 100644 (file)
 
 // compile-flags: --edition=2018
 // aux-build:edition-kw-macro-2015.rs
+// compile-pass
 
 #![feature(raw_identifiers)]
 
 #[macro_use]
 extern crate edition_kw_macro_2015;
 
-// `async`
 mod one_async {
     produces_async! {} // OK
 }
@@ -24,10 +24,4 @@ mod two_async {
     produces_async_raw! {} // OK
 }
 
-// `proc`
-mod one_proc {
-    produces_proc! {} // ERROR expected identifier, found reserved keyword
-}
-mod two_proc {
-    produces_proc_raw! {} // OK
-}
+fn main() {}
diff --git a/src/test/ui/edition-keywords-2018-2015-expansion.stderr b/src/test/ui/edition-keywords-2018-2015-expansion.stderr
deleted file mode 100644 (file)
index 320022e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-error: expected identifier, found reserved keyword `proc`
-  --> $DIR/edition-keywords-2018-2015-expansion.rs:29:5
-   |
-LL |     produces_proc! {} // ERROR expected identifier, found reserved keyword
-   |     ^^^^^^^^^^^^^^^^^ expected identifier, found reserved keyword
-   |
-   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
-
-error: aborting due to previous error
-
index 26a503d642d0db51143f094f82e79ce6e8062759..29c5ea41f1fac2f51930980c1f92a6917ade560a 100644 (file)
 #[macro_use]
 extern crate edition_kw_macro_2015;
 
-// `proc`
-pub fn check_proc() {
-    let mut proc = 1; // OK
-    let mut r#proc = 1; // OK
-
-    r#proc = consumes_proc!(proc); // OK
-    r#proc = consumes_proc!(r#proc); //~ ERROR no rules expected the token `r#proc`
-    r#proc = consumes_proc_raw!(proc); //~ ERROR no rules expected the token `proc`
-    r#proc = consumes_proc_raw!(r#proc); // OK
-
-    if passes_ident!(proc) == 1 {} // OK
-    if passes_ident!(r#proc) == 1 {} // OK
-    module::proc(); // OK
-    module::r#proc(); // OK
-}
-
-// `async`
 pub fn check_async() {
     let mut async = 1; //~ ERROR expected identifier, found reserved keyword `async`
     let mut r#async = 1; // OK
index d39d5a8a90154162efdb3d8cdeae9c4e5b985b5e..0b3ca57bfab151cfffa55ac53b07a2c5a75f6fd2 100644 (file)
@@ -1,44 +1,32 @@
 error: expected identifier, found reserved keyword `async`
-  --> $DIR/edition-keywords-2018-2015-parsing.rs:37:13
+  --> $DIR/edition-keywords-2018-2015-parsing.rs:20:13
    |
 LL |     let mut async = 1; //~ ERROR expected identifier, found reserved keyword `async`
    |             ^^^^^ expected identifier, found reserved keyword
 
 error: expected identifier, found reserved keyword `async`
-  --> $DIR/edition-keywords-2018-2015-parsing.rs:47:13
+  --> $DIR/edition-keywords-2018-2015-parsing.rs:30:13
    |
 LL |     module::async(); //~ ERROR expected identifier, found reserved keyword `async`
    |             ^^^^^ expected identifier, found reserved keyword
 
-error: no rules expected the token `r#proc`
-  --> $DIR/edition-keywords-2018-2015-parsing.rs:25:29
-   |
-LL |     r#proc = consumes_proc!(r#proc); //~ ERROR no rules expected the token `r#proc`
-   |                             ^^^^^^
-
-error: no rules expected the token `proc`
-  --> $DIR/edition-keywords-2018-2015-parsing.rs:26:33
-   |
-LL |     r#proc = consumes_proc_raw!(proc); //~ ERROR no rules expected the token `proc`
-   |                                 ^^^^
-
 error: no rules expected the token `r#async`
-  --> $DIR/edition-keywords-2018-2015-parsing.rs:41:31
+  --> $DIR/edition-keywords-2018-2015-parsing.rs:24:31
    |
 LL |     r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async`
    |                               ^^^^^^^
 
 error: no rules expected the token `async`
-  --> $DIR/edition-keywords-2018-2015-parsing.rs:42:35
+  --> $DIR/edition-keywords-2018-2015-parsing.rs:25:35
    |
 LL |     r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
    |                                   ^^^^^
 
 error: expected expression, found reserved keyword `async`
-  --> $DIR/edition-keywords-2018-2015-parsing.rs:45:22
+  --> $DIR/edition-keywords-2018-2015-parsing.rs:28:22
    |
 LL |     if passes_ident!(async) == 1 {} //~ ERROR expected expression, found reserved keyword `async`
    |                      ^^^^^ expected expression
 
-error: aborting due to 7 previous errors
+error: aborting due to 5 previous errors
 
index 55732da8bc086f899869351f97cedbd83d6ffdef..ef7f63e225ce159aa3d86f187a6c7cd23ff7238e 100644 (file)
 #[macro_use]
 extern crate edition_kw_macro_2018;
 
-// `async`
 mod one_async {
     produces_async! {} // ERROR expected identifier, found reserved keyword `async`
 }
 mod two_async {
     produces_async_raw! {} // OK
 }
-
-// `proc`
-mod one_proc {
-    produces_proc! {} // OK
-}
-mod two_proc {
-    produces_proc_raw! {} // OK
-}
index 236409c96280152f639873f0aa2fcfb6d03aa07d..cd51030fd28e1b31b0faf15e0db3088573f165a7 100644 (file)
@@ -1,5 +1,5 @@
 error: expected identifier, found reserved keyword `async`
-  --> $DIR/edition-keywords-2018-2018-expansion.rs:21:5
+  --> $DIR/edition-keywords-2018-2018-expansion.rs:20:5
    |
 LL |     produces_async! {} // ERROR expected identifier, found reserved keyword `async`
    |     ^^^^^^^^^^^^^^^^^^ expected identifier, found reserved keyword
index 7fc7450d5b2604b130afe4bc49d1238d17e3e1b5..a94808eb2246cb97236a8d64fdeafdce2a1de0c2 100644 (file)
 #[macro_use]
 extern crate edition_kw_macro_2018;
 
-// `proc`
-pub fn check_proc() {
-    let mut proc = 1; // OK
-    let mut r#proc = 1; // OK
-
-    r#proc = consumes_proc!(proc); // OK
-    r#proc = consumes_proc!(r#proc); //~ ERROR no rules expected the token `r#proc`
-    r#proc = consumes_proc_raw!(proc); //~ ERROR no rules expected the token `proc`
-    r#proc = consumes_proc_raw!(r#proc); // OK
-
-    if passes_ident!(proc) == 1 {} // OK
-    if passes_ident!(r#proc) == 1 {} // OK
-    module::proc(); // OK
-    module::r#proc(); // OK
-}
-
-// `async`
 pub fn check_async() {
     let mut async = 1; //~ ERROR expected identifier, found reserved keyword `async`
     let mut r#async = 1; // OK
index fba1ec6d18af95e4898792df4654c59ab32a03e2..1b18d8a39beb44f8ea7cfb136fcd194ad25a03a0 100644 (file)
@@ -1,44 +1,32 @@
 error: expected identifier, found reserved keyword `async`
-  --> $DIR/edition-keywords-2018-2018-parsing.rs:37:13
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:20:13
    |
 LL |     let mut async = 1; //~ ERROR expected identifier, found reserved keyword `async`
    |             ^^^^^ expected identifier, found reserved keyword
 
 error: expected identifier, found reserved keyword `async`
-  --> $DIR/edition-keywords-2018-2018-parsing.rs:47:13
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:30:13
    |
 LL |     module::async(); //~ ERROR expected identifier, found reserved keyword `async`
    |             ^^^^^ expected identifier, found reserved keyword
 
-error: no rules expected the token `r#proc`
-  --> $DIR/edition-keywords-2018-2018-parsing.rs:25:29
-   |
-LL |     r#proc = consumes_proc!(r#proc); //~ ERROR no rules expected the token `r#proc`
-   |                             ^^^^^^
-
-error: no rules expected the token `proc`
-  --> $DIR/edition-keywords-2018-2018-parsing.rs:26:33
-   |
-LL |     r#proc = consumes_proc_raw!(proc); //~ ERROR no rules expected the token `proc`
-   |                                 ^^^^
-
 error: no rules expected the token `r#async`
-  --> $DIR/edition-keywords-2018-2018-parsing.rs:41:31
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:24:31
    |
 LL |     r#async = consumes_async!(r#async); //~ ERROR no rules expected the token `r#async`
    |                               ^^^^^^^
 
 error: no rules expected the token `async`
-  --> $DIR/edition-keywords-2018-2018-parsing.rs:42:35
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:25:35
    |
 LL |     r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
    |                                   ^^^^^
 
 error: expected expression, found reserved keyword `async`
-  --> $DIR/edition-keywords-2018-2018-parsing.rs:45:22
+  --> $DIR/edition-keywords-2018-2018-parsing.rs:28:22
    |
 LL |     if passes_ident!(async) == 1 {} //~ ERROR expected expression, found reserved keyword `async`
    |                      ^^^^^ expected expression
 
-error: aborting due to 7 previous errors
+error: aborting due to 5 previous errors