diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-05-26 15:12:38 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-05-26 15:20:23 +0300 |
| commit | 1e4269cb83a14f53851460c4780ff06d0a9f1d50 (patch) | |
| tree | d0de1096bf6562f34c4291b51d150e7ebb629783 /src/libsyntax/parse/parser.rs | |
| parent | 189c0a1297f9341fd25f4c0a0f09c47610cdcbf1 (diff) | |
| download | rust-1e4269cb83a14f53851460c4780ff06d0a9f1d50.tar.gz rust-1e4269cb83a14f53851460c4780ff06d0a9f1d50.zip | |
Add `Ident::as_str` helper
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 5a3e5586495..4d38d292876 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -6054,7 +6054,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()); } } @@ -6075,7 +6075,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 { "" |
