Remove the proc keyword again

This commit is contained in:
Vadim Petrochenkov 2018-05-13 16:35:52 +03:00
parent c4352ff198
commit dae5f05f43
25 changed files with 31 additions and 451 deletions

View 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)
}

View 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)
}

View file

@ -10,13 +10,13 @@
// 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() {}

View file

@ -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

View 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
}

View 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

View file

@ -16,18 +16,9 @@
#[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
}

View 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

View 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
}

View 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

View file

@ -10,13 +10,13 @@
// 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() {}

View file

@ -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

View file

@ -16,23 +16,6 @@
#[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

View 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

View file

@ -16,18 +16,9 @@
#[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
}

View 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

View file

@ -16,23 +16,6 @@
#[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

View 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