about summary refs log tree commit diff
path: root/src/libsyntax/diagnostics/plugin.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-06-15 17:45:02 +0200
committerGitHub <noreply@github.com>2019-06-15 17:45:02 +0200
commitbe09427b116098d9dec63694e51cbddac7f958e5 (patch)
tree66b9ebfbf19e5de8b7dd13b74e721dbca8b51536 /src/libsyntax/diagnostics/plugin.rs
parent9e810a277574dc77e8001cc955bfa19d6b574696 (diff)
parent5c84cd37cbfc16ef80bbad1f6416419d3cf06df6 (diff)
downloadrust-be09427b116098d9dec63694e51cbddac7f958e5.tar.gz
rust-be09427b116098d9dec63694e51cbddac7f958e5.zip
Rollup merge of #61813 - matthewjasper:remove-unnecessary-symbol-ops, r=petrochenkov
Remove some unnecessary symbol interner ops

* Don't gensym symbols that don't need to worry about colliding with other symbols
* Use symbol constants instead of interning string literals in a few places.
* Don't generate a module in `__register_diagnostic`

r? @petrochenkov
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
-rw-r--r--src/libsyntax/diagnostics/plugin.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs
index 98351048c35..ee640a1603a 100644
--- a/src/libsyntax/diagnostics/plugin.rs
+++ b/src/libsyntax/diagnostics/plugin.rs
@@ -120,19 +120,7 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt<'_>,
         }
     });
 
-    let span = span.apply_mark(ecx.current_expansion.mark);
-
-    let name = Ident::from_str_and_span(&format!("__register_diagnostic_{}", code), span).gensym();
-
-    MacEager::items(smallvec![
-        ecx.item_mod(
-            span,
-            span,
-            name,
-            vec![],
-            vec![],
-        )
-    ])
+    MacEager::items(smallvec![])
 }
 
 #[allow(deprecated)]