1
Fork 0

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.
This commit is contained in:
Diogo Sousa 2018-09-19 01:09:36 +01:00
parent 79fcc58b24
commit 2d7edf908d
11 changed files with 47 additions and 15 deletions

View file

@ -87,7 +87,7 @@ scoped_thread_local!(pub static GLOBALS: Globals);
#[derive(Debug, Eq, PartialEq, Clone, Ord, PartialOrd, Hash, RustcDecodable, RustcEncodable)]
pub enum FileName {
Real(PathBuf),
/// e.g. "std" macros
/// A macro. This includes the full name of the macro, so that there are no clashes.
Macros(String),
/// call to `quote!`
QuoteExpansion,