rust/compiler
bors b9197978a9 Auto merge of #86876 - jyn514:56935-target-crate-num, r=petrochenkov
Reuse CrateNum for proc-macro crates even when cross-compiling

Proc-macros are always compiled for the host, so this should be the same
in every way as recompiling the crate.

I am not sure why the previous code special-cased the target, since the
compiler properly gives an error when trying to load a crate for a
different host:

```
error[E0461]: couldn't find crate `dependency` with expected target triple x86_64-unknown-linux-gnu
  --> /home/joshua/rustc4/src/test/ui/cfg-dependent.rs:8:2
   |
LL |     dependency::is_64();
   |     ^^^^^^^^^^
   |
   = note: the following crate versions were found:
           crate `dependency`, target triple i686-unknown-linux-gnu: /home/joshua/rustc4/build/x86_64-unknown-linux-gnu/test/ui/cfg-dependent/auxiliary/libdependency.so
```

I think another possible fix is to remove the check altogether. But I'm
not sure, and this fix works, so I'm not making the larger change here.

Fixes https://github.com/rust-lang/rust/issues/56935.

r? `@petrochenkov` cc `@alexcrichton`
2021-07-15 02:39:38 +00:00
..
rustc
rustc_apfloat Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
rustc_arena
rustc_ast Auto merge of #83918 - workingjubilee:stable-rangefrom-pat, r=joshtriplett 2021-07-11 06:31:42 +00:00
rustc_ast_lowering Cache expansion hash. 2021-07-13 23:10:56 +02:00
rustc_ast_passes Auto merge of #83918 - workingjubilee:stable-rangefrom-pat, r=joshtriplett 2021-07-11 06:31:42 +00:00
rustc_ast_pretty Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
rustc_attr Enhance well-formedness checks for #[repr(...)] attributes 2021-07-09 22:03:48 +02:00
rustc_builtin_macros expand: Support helper attributes for built-in derive macros 2021-07-13 21:59:22 +03:00
rustc_codegen_cranelift Use cranelift's Type::int instead of doing the match myself 2021-07-08 14:55:58 -07:00
rustc_codegen_llvm Auto merge of #86416 - Amanieu:asm_clobber_only, r=nagisa 2021-07-11 01:06:58 +00:00
rustc_codegen_ssa Auto merge of #87082 - michaelwoerister:const-in-debuginfo-type-names-fix, r=oli-obk,wesleywiser 2021-07-14 15:18:27 +00:00
rustc_data_structures rustc_data_structures: Drop unused dependency on crossbeam-utils 2021-06-25 01:03:16 -07:00
rustc_driver Auto merge of #80182 - in42:stack_trace, r=tmandry 2021-07-02 05:40:51 +00:00
rustc_error_codes Rollup merge of #86838 - lambinoo:I-69630-rust_const_unstable_check_const, r=oli-obk 2021-07-08 18:30:34 +02:00
rustc_errors Simplify future incompatible reporting. 2021-07-11 13:08:58 -07:00
rustc_expand Rollup merge of #87027 - petrochenkov:builderhelp, r=oli-obk 2021-07-14 19:53:35 +02:00
rustc_feature expand: Support helper attributes for built-in derive macros 2021-07-13 21:59:22 +03:00
rustc_fs_util
rustc_graphviz Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
rustc_hir Auto merge of #85941 - cjgillot:qresolve, r=Aaron1011 2021-07-11 16:09:17 +00:00
rustc_hir_pretty Rollup merge of #86358 - klensy:pp-loop, r=Mark-Simulacrum 2021-06-29 00:26:55 +09:00
rustc_incremental Revert "Revert "Merge CrateDisambiguator into StableCrateId"" 2021-07-06 11:28:04 +02:00
rustc_index
rustc_infer remove unused Option 2021-07-04 11:09:32 -04:00
rustc_interface Shrink the CrateStore dynamic interface. 2021-07-14 16:37:56 +02:00
rustc_lexer Rename 'bad prefix' to 'unknown prefix'. 2021-06-26 23:11:14 +08:00
rustc_lint Auto merge of #86827 - camsteffen:hash-lint-resolved, r=oli-obk 2021-07-13 15:06:10 +00:00
rustc_lint_defs Simplify future incompatible reporting. 2021-07-11 13:08:58 -07:00
rustc_llvm Upgrade cc crate to 1.0.69 2021-07-13 17:58:50 +09:00
rustc_macros Fix default_hash_types to use resolved path 2021-07-09 09:10:45 -05:00
rustc_metadata Auto merge of #86876 - jyn514:56935-target-crate-num, r=petrochenkov 2021-07-15 02:39:38 +00:00
rustc_middle Shrink the CrateStore dynamic interface. 2021-07-14 16:37:56 +02:00
rustc_mir Auto merge of #87044 - cjgillot:expnhash, r=petrochenkov 2021-07-13 22:32:58 +00:00
rustc_mir_build Auto merge of #86665 - FabianWolff:layout-field-thir-unsafeck, r=oli-obk 2021-07-13 04:38:39 +00:00
rustc_parse Suggest a path separator if a stray colon is found in a match arm 2021-07-14 01:15:59 +02:00
rustc_parse_format Rework SESSION_GLOBALS API to prevent overwriting it 2021-07-08 16:16:28 +02:00
rustc_passes Auto merge of #86857 - fee1-dead:add-attr, r=oli-obk 2021-07-13 06:59:34 +00:00
rustc_plugin_impl
rustc_privacy Make resolutions a query. 2021-07-06 19:22:27 +02:00
rustc_query_impl Correct comments about untracked accesses. 2021-07-06 19:26:02 +02:00
rustc_query_system Auto merge of #85154 - cjgillot:lessfn, r=bjorn3 2021-06-15 14:52:58 +00:00
rustc_resolve Shrink the CrateStore dynamic interface. 2021-07-14 16:37:56 +02:00
rustc_save_analysis rustc_span: Revert addition of proc_macro field to ExpnKind::Macro 2021-07-10 23:03:35 +03:00
rustc_serialize Emit warnings for unused fields in custom targets. 2021-06-17 21:48:02 +02:00
rustc_session Auto merge of #86922 - joshtriplett:target-abi, r=oli-obk 2021-07-13 12:25:10 +00:00
rustc_span Auto merge of #87106 - Mark-Simulacrum:edition-no-clone, r=petrochenkov 2021-07-14 01:41:12 +00:00
rustc_symbol_mangling Revert "Revert "Merge CrateDisambiguator into StableCrateId"" 2021-07-06 11:28:04 +02:00
rustc_target Auto merge of #86922 - joshtriplett:target-abi, r=oli-obk 2021-07-13 12:25:10 +00:00
rustc_trait_selection Rollup merge of #86726 - sexxi-goose:use-diagnostic-item-for-rfc2229-migration, r=nikomatsakis 2021-07-08 18:30:33 +02:00
rustc_traits Combine individual limit queries into single limits query 2021-07-04 13:02:51 -05:00
rustc_ty_utils Add impl_constness query 2021-07-10 20:54:49 +08:00
rustc_type_ir
rustc_typeck Auto merge of #86249 - FabianWolff:issue-86238, r=varkor 2021-07-11 22:39:16 +00:00