Do not complain about missing crate named as a keyword

This commit is contained in:
Esteban Küber 2018-12-29 16:35:57 -08:00
parent 59183180f7
commit 5a2c301106
6 changed files with 42 additions and 5 deletions

View file

@ -0,0 +1,9 @@
// run-pass
mod m {
pub fn r#for() {}
}
fn main() {
m::r#for();
}

View file

@ -0,0 +1,8 @@
mod m {
pub fn r#for() {}
}
fn main() {
m::for();
//~^ ERROR expected identifier, found keyword `for`
}

View file

@ -0,0 +1,8 @@
error: expected identifier, found keyword `for`
--> $DIR/issue-57198.rs:6:8
|
LL | m::for();
| ^^^ expected identifier, found keyword
error: aborting due to previous error