1
Fork 0

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
commit 1e504d301c
51 changed files with 208 additions and 186 deletions

View file

@ -6067,7 +6067,7 @@ impl<'a> Parser<'a> {
self.directory.path.to_mut().push(&path.as_str());
self.directory.ownership = DirectoryOwnership::Owned { relative: None };
} else {
self.directory.path.to_mut().push(&id.name.as_str());
self.directory.path.to_mut().push(&id.as_str());
}
}
@ -6088,7 +6088,7 @@ impl<'a> Parser<'a> {
// `./<id>.rs` and `./<id>/mod.rs`.
let relative_prefix_string;
let relative_prefix = if let Some(ident) = relative {
relative_prefix_string = format!("{}{}", ident.name.as_str(), path::MAIN_SEPARATOR);
relative_prefix_string = format!("{}{}", ident.as_str(), path::MAIN_SEPARATOR);
&relative_prefix_string
} else {
""