Remove the proc keyword again
This commit is contained in:
parent
c4352ff198
commit
dae5f05f43
25 changed files with 31 additions and 451 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue