diff options
| author | bors <bors@rust-lang.org> | 2019-01-14 23:00:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-01-14 23:00:50 +0000 |
| commit | aea9f0aa976db2f5de28be3b6b287c6889cd926b (patch) | |
| tree | 1f45e79c5694619f8b0ea8a4652abce5a2c49a52 /src/librustc_codegen_utils | |
| parent | 03acbd71c977cd63ce5f39ba9b6fe9ffd578785a (diff) | |
| parent | 8a62e393b8fba95e989020f2efbf846ca02113f9 (diff) | |
| download | rust-aea9f0aa976db2f5de28be3b6b287c6889cd926b.tar.gz rust-aea9f0aa976db2f5de28be3b6b287c6889cd926b.zip | |
Auto merge of #57607 - Centril:rollup, r=Centril
Rollup of 8 pull requests Successful merges: - #57043 (Fix poor worst case performance of set intersection) - #57480 (Clean up and fix a bug in query plumbing) - #57481 (provide suggestion for invalid boolean cast) - #57540 (Modify some parser diagnostics to continue evaluating beyond the parser) - #57570 (Querify local `plugin_registrar_fn` and `proc_macro_decls_static`) - #57572 (Unaccept `extern_in_paths`) - #57585 (Recover from item trailing semicolon) - #57589 (Add a debug_assert to Vec::set_len) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc_codegen_utils')
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_codegen_utils/symbol_names.rs b/src/librustc_codegen_utils/symbol_names.rs index 5a5d1b20b21..9267f14f242 100644 --- a/src/librustc_codegen_utils/symbol_names.rs +++ b/src/librustc_codegen_utils/symbol_names.rs @@ -242,12 +242,12 @@ fn compute_symbol_name<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, instance: Instance let node_id = tcx.hir().as_local_node_id(def_id); - if let Some(id) = node_id { - if *tcx.sess.plugin_registrar_fn.get() == Some(id) { + if def_id.is_local() { + if tcx.plugin_registrar_fn(LOCAL_CRATE) == Some(def_id) { let disambiguator = tcx.sess.local_crate_disambiguator(); return tcx.sess.generate_plugin_registrar_symbol(disambiguator); } - if *tcx.sess.proc_macro_decls_static.get() == Some(id) { + if tcx.proc_macro_decls_static(LOCAL_CRATE) == Some(def_id) { let disambiguator = tcx.sess.local_crate_disambiguator(); return tcx.sess.generate_proc_macro_decls_symbol(disambiguator); } |
