Auto merge of #57208 - estebank:issue-57198, r=petrochenkov

Do not complain about missing crate named as a keyword

Fix #57198.
This commit is contained in:
bors 2018-12-31 08:06:15 +00:00
commit aeed63bf38
5 changed files with 30 additions and 2 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