diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2019-10-15 16:07:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-15 16:07:41 -0700 |
| commit | af3d9e57e7e487b86b113bb235b716111be48bb8 (patch) | |
| tree | f3ed9b710d09056b6eb983060d71011050d0833c /src/libsyntax | |
| parent | fcef4b1aef27d37b8fb5e308766636de1a6e99b2 (diff) | |
| parent | 4198df1f4be969747bc92254185ae4983e8f3c5c (diff) | |
| download | rust-af3d9e57e7e487b86b113bb235b716111be48bb8.tar.gz rust-af3d9e57e7e487b86b113bb235b716111be48bb8.zip | |
Rollup merge of #64623 - matthewjasper:underscore-imports, r=petrochenkov
Remove last uses of gensyms Underscore bindings now use unique `SyntaxContext`s to avoid collisions. This was the last use of gensyms in the compiler, so this PR also removes them. closes #49300 cc #60869 r? @petrochenkov
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/proc_macro_server.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsyntax/ext/proc_macro_server.rs b/src/libsyntax/ext/proc_macro_server.rs index 300523c1b0a..e0e1a1c468c 100644 --- a/src/libsyntax/ext/proc_macro_server.rs +++ b/src/libsyntax/ext/proc_macro_server.rs @@ -334,8 +334,7 @@ impl Ident { if !Self::is_valid(&string) { panic!("`{:?}` is not a valid identifier", string) } - // Get rid of gensyms to conservatively check rawness on the string contents only. - if is_raw && !sym.as_interned_str().as_symbol().can_be_raw() { + if is_raw && !sym.can_be_raw() { panic!("`{}` cannot be a raw identifier", string); } Ident { sym, is_raw, span } |
