Auto merge of #54338 - orium:fix-macro-inc-comp, r=nrc

Use full name to identify a macro in a `FileName`.

Before this two macros with same name would be indistinguishable inside a `FileName`.  This caused a bug in incremental compilation (see #53097) since two different macros would map out to the same `StableFilemapId`.

Fixes #53097.

r? @nrc
This commit is contained in:
bors 2018-09-28 06:40:32 +00:00
commit bd8d030d01
11 changed files with 47 additions and 15 deletions

View file

@ -23,7 +23,7 @@ LL | r#async = consumes_async_raw!(async); //~ ERROR no rules expected the t
| ^^^^^
error: expected one of `move`, `|`, or `||`, found `<eof>`
--> <passes_ident macros>:1:22
--> <::edition_kw_macro_2015::passes_ident macros>:1:22
|
LL | ( $ i : ident ) => ( $ i )
| ^^^ expected one of `move`, `|`, or `||` here

View file

@ -23,7 +23,7 @@ LL | r#async = consumes_async_raw!(async); //~ ERROR no rules expected the t
| ^^^^^
error: expected one of `move`, `|`, or `||`, found `<eof>`
--> <passes_ident macros>:1:22
--> <::edition_kw_macro_2018::passes_ident macros>:1:22
|
LL | ( $ i : ident ) => ( $ i )
| ^^^ expected one of `move`, `|`, or `||` here

View file

@ -60,7 +60,7 @@ LL | define_panic!();
= note: macro-expanded macros do not shadow
error[E0659]: `panic` is ambiguous
--> <panic macros>:1:13
--> <::std::macros::panic macros>:1:13
|
LL | ( ) => ( { panic ! ( "explicit panic" ) } ) ; ( $ msg : expr ) => (
| ^^^^^ ambiguous name

View file

@ -22,7 +22,7 @@ LL | | }
LL | ping!();
| -------- in this macro invocation
|
::: <ping macros>:1:1
::: <::ping::ping macros>:1:1
|
LL | ( ) => { pong ! ( ) ; }
| -------------------------
@ -42,7 +42,7 @@ LL | | }
LL | deep!();
| -------- in this macro invocation (#1)
|
::: <deep macros>:1:1
::: <::ping::deep macros>:1:1
|
LL | ( ) => { foo ! ( ) ; }
| ------------------------
@ -50,7 +50,7 @@ LL | ( ) => { foo ! ( ) ; }
| | in this macro invocation (#2)
| in this expansion of `deep!` (#1)
|
::: <foo macros>:1:1
::: <::ping::foo macros>:1:1
|
LL | ( ) => { bar ! ( ) ; }
| ------------------------
@ -58,7 +58,7 @@ LL | ( ) => { bar ! ( ) ; }
| | in this macro invocation (#3)
| in this expansion of `foo!` (#2)
|
::: <bar macros>:1:1
::: <::ping::bar macros>:1:1
|
LL | ( ) => { ping ! ( ) ; }
| -------------------------
@ -66,7 +66,7 @@ LL | ( ) => { ping ! ( ) ; }
| | in this macro invocation (#4)
| in this expansion of `bar!` (#3)
|
::: <ping macros>:1:1
::: <::ping::ping macros>:1:1
|
LL | ( ) => { pong ! ( ) ; }
| -------------------------