1
Fork 0

Replace #[plugin_registrar] with exporting __rustc_plugin_registrar

This commit is contained in:
bjorn3 2021-05-14 15:37:53 +02:00
parent 2d10c2a330
commit a501308ec1
35 changed files with 287 additions and 556 deletions

View file

@ -164,10 +164,6 @@ fn compute_symbol_name(
// FIXME(eddyb) Precompute a custom symbol name based on attributes.
let is_foreign = if let Some(def_id) = def_id.as_local() {
if tcx.plugin_registrar_fn(()) == Some(def_id) {
let stable_crate_id = tcx.sess.local_stable_crate_id();
return tcx.sess.generate_plugin_registrar_symbol(stable_crate_id);
}
if tcx.proc_macro_decls_static(()) == Some(def_id) {
let stable_crate_id = tcx.sess.local_stable_crate_id();
return tcx.sess.generate_proc_macro_decls_symbol(stable_crate_id);