about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-05-18 00:27:49 -0700
committerbors <bors@rust-lang.org>2016-05-18 00:27:49 -0700
commit310d8996f40fceaa8d294577276cfb1b080c8bc9 (patch)
tree42009bb563e6ab18b8ed13450fee15fd7ee09da5 /src/libsyntax
parent75e23e1b032d87300392a4f3835bde8d5d873823 (diff)
parent02a1eef6e4eb4bcc214e0e00ddc62406c8990e2d (diff)
downloadrust-310d8996f40fceaa8d294577276cfb1b080c8bc9.tar.gz
rust-310d8996f40fceaa8d294577276cfb1b080c8bc9.zip
Auto merge of #33654 - petrochenkov:hirident, r=nrc
Remove hir::Ident

Now when name resolution is done on AST, `hir::Ident` is no longer necessary.
See https://github.com/rust-lang/rust/pull/30145 for more details.

r? @nrc
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 0f3b9be3a7a..d9409d3bbd9 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -60,6 +60,10 @@ impl Name {
     pub fn as_str(self) -> token::InternedString {
         token::InternedString::new_from_name(self)
     }
+
+    pub fn unhygienize(self) -> Name {
+        token::intern(&self.as_str())
+    }
 }
 
 impl fmt::Debug for Name {