diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2016-10-30 03:42:12 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2016-11-28 04:18:10 +0200 |
| commit | f97c132cac79ef6bdf9f950b415c67bb43af387a (patch) | |
| tree | e9b0354787759a02e3c17e7d02506fa6f87c3794 /src/libsyntax | |
| parent | da47c2e2ac7d3d663646a4928c77f6a7f67a91aa (diff) | |
| download | rust-f97c132cac79ef6bdf9f950b415c67bb43af387a.tar.gz rust-f97c132cac79ef6bdf9f950b415c67bb43af387a.zip | |
rustc: use Span's allow_internal_unstable instead of hir::BlockCheckMode.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/codemap.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 3cdfa718eab..12ce6428911 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -51,6 +51,8 @@ pub enum ExpnFormat { MacroAttribute(Name), /// e.g. `format!()` MacroBang(Name), + /// Desugaring done by the compiler during HIR lowering. + CompilerDesugaring(Name) } #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] @@ -105,8 +107,9 @@ pub struct NameAndSpan { impl NameAndSpan { pub fn name(&self) -> Name { match self.format { - ExpnFormat::MacroAttribute(s) => s, - ExpnFormat::MacroBang(s) => s, + ExpnFormat::MacroAttribute(s) | + ExpnFormat::MacroBang(s) | + ExpnFormat::CompilerDesugaring(s) => s, } } } @@ -813,6 +816,7 @@ impl CodeMap { let (pre, post) = match ei.callee.format { MacroAttribute(..) => ("#[", "]"), MacroBang(..) => ("", "!"), + CompilerDesugaring(..) => ("desugaring of `", "`"), }; let macro_decl_name = format!("{}{}{}", pre, |
