about summary refs log tree commit diff
path: root/src/libsyntax/diagnostics/plugin.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-09-26 14:48:56 +0000
committerbors <bors@rust-lang.org>2015-09-26 14:48:56 +0000
commit2e88c36ebcec101c7de6313c4d45ffe66123fd3a (patch)
tree918c785754a57678d6c9c63e97171273fa2a56ae /src/libsyntax/diagnostics/plugin.rs
parent9169e6c53c53999d0ca176067a36c57aef84757b (diff)
parentf284cbc7af06a941de0cdd06291dc78d37268b9f (diff)
downloadrust-2e88c36ebcec101c7de6313c4d45ffe66123fd3a.tar.gz
rust-2e88c36ebcec101c7de6313c4d45ffe66123fd3a.zip
Auto merge of #28642 - petrochenkov:name3, r=nrc
This PR removes random remaining `Ident`s outside of libsyntax and performs general cleanup
In particular, interfaces of `Name` and `Ident` are tidied up, `Name`s and `Ident`s being small `Copy` aggregates are always passed to functions by value, and `Ident`s are never used as keys in maps, because `Ident` comparisons are tricky.

Although this PR closes https://github.com/rust-lang/rust/issues/6993 there's still work related to it:
- `Name` can be made `NonZero` to compress numerous `Option<Name>`s and `Option<Ident>`s but it requires const unsafe functions.
- Implementation of `PartialEq` on `Ident` should be eliminated and replaced with explicit hygienic, non-hygienic or member-wise comparisons.
- Finally, large parts of AST can potentially be converted to `Name`s in the same way as HIR to clearly separate identifiers used in hygienic and non-hygienic contexts.

r? @nrc 
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
-rw-r--r--src/libsyntax/diagnostics/plugin.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs
index 6c3bee3f48e..a276765e216 100644
--- a/src/libsyntax/diagnostics/plugin.rs
+++ b/src/libsyntax/diagnostics/plugin.rs
@@ -138,7 +138,7 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt,
             ));
         }
     });
-    let sym = Ident::new(token::gensym(&format!(
+    let sym = Ident::with_empty_ctxt(token::gensym(&format!(
         "__register_diagnostic_{}", code
     )));
     MacEager::items(SmallVector::many(vec![