Auto merge of #51072 - petrochenkov:ifield, r=eddyb

Use `Ident`s for fields in HIR

Continuation of https://github.com/rust-lang/rust/pull/49718, part of https://github.com/rust-lang/rust/issues/49300
This commit is contained in:
bors
2018-05-26 16:56:22 +00:00
51 changed files with 208 additions and 186 deletions

View File

@@ -724,7 +724,7 @@ pub trait PrintState<'a> {
if segment.ident.name != keywords::CrateRoot.name() &&
segment.ident.name != keywords::DollarCrate.name()
{
self.writer().word(&segment.ident.name.as_str())?;
self.writer().word(&segment.ident.as_str())?;
} else if segment.ident.name == keywords::DollarCrate.name() {
self.print_dollar_crate(segment.ident.span.ctxt())?;
}
@@ -2380,7 +2380,7 @@ impl<'a> State<'a> {
if ident.is_raw_guess() {
self.s.word(&format!("r#{}", ident))?;
} else {
self.s.word(&ident.name.as_str())?;
self.s.word(&ident.as_str())?;
}
self.ann.post(self, NodeIdent(&ident))
}