diff options
| author | bors <bors@rust-lang.org> | 2018-05-26 16:56:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-26 16:56:22 +0000 |
| commit | 1e504d301c07f84630ff0e35f10d2d69688887d6 (patch) | |
| tree | a27f46c192f49bda47c68ba5c8b7e1eee7097a5a /src/libsyntax/parse | |
| parent | 1594c6c650dfbb9606ead602548b96997d507f64 (diff) | |
| parent | 1e4269cb83a14f53851460c4780ff06d0a9f1d50 (diff) | |
| download | rust-1e504d301c07f84630ff0e35f10d2d69688887d6.tar.gz rust-1e504d301c07f84630ff0e35f10d2d69688887d6.zip | |
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
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 2c246d75b52..716faaa4e39 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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 { "" diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index ed28d5f33b9..9770fbca8f8 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -341,7 +341,7 @@ impl Token { /// string slice. pub fn is_ident_named(&self, name: &str) -> bool { match self.ident() { - Some((ident, _)) => ident.name.as_str() == name, + Some((ident, _)) => ident.as_str() == name, None => false } } |
