rust/compiler
bors ebf2b375e1 Auto merge of #110699 - jyn514:simulate-remapped-already-remapped, r=cjgillot
Apply simulate-remapped-rust-src-base even if remap-debuginfo is set in config.toml

This is really a mess. Here is the situation before this change:

- UI tests depend on not having `rust-src` available. In particular, <3f374128ee/tests/ui/tuple/wrong_argument_ice.stderr (L7-L8)> is depending on the `note` being a single line and not showing the source code.
- When `download-rustc` is disabled, we pass `-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX` `-Ztranslate-remapped-path-to-local-path=no`, which changes the diagnostic to something like `  --> /rustc/FAKE_PREFIX/library/alloc/src/collections/vec_deque/mod.rs:1657:12`
- When `download-rustc` is enabled, we still pass those flags, but they no longer have an effect. Instead rustc emits diagnostic paths like this: `  --> /rustc/39c6804b92aa202369e402525cee329556bc1db0/library/alloc/src/collections/vec_deque/mod.rs:1657:12`. Notice how there's a real commit and not `FAKE_PREFIX`. This happens because we set `CFG_VIRTUAL_RUST_SOURCE_BASE_DIR` during bootstrapping for CI artifacts, and rustc previously didn't allow for `simulate-remapped` to affect paths that had already been remapped.
- Pietro noticed this and decided the right thing was to normalize `/rustc/<commit>` to `$SRC_DIR` in compiletest: 470423c3d2
- After my change to `x test core`, which rebuilds stage 2 std from source so `build/stage2-std` and `build/stage2` use the same `.rlib` metadata, the compiler suddenly notices it has sources for `std` available and prints those in the diagnostic, causing the test to fail.

This changes `simulate-remapped-rust-src-base` to support remapping paths that have already been remapped, unblocking download-rustc.

Unfortunately, although this fixes the specific problem for
download-rustc, it doesn't seem to affect all the compiler's
diagnostics. In particular, various `mir-opt` tests are failing to
respect `simulate-remapped-path-prefix` (I looked into fixing this but
it seems non-trivial). As a result, we can't remove the normalization in
compiletest that maps `/rustc/<commit>` to `$SRC_DIR`, so this change is
currently untested anywhere except locally.

You can test this locally yourself by setting `rust.remap-debuginfo = true`, running any UI test with `ERROR` annotations, then rerunning the test manually with a dev toolchain to verify it prints `/rustc/FAKE_PREFIX`, not `/rustc/1.71.0`.

Helps with https://github.com/rust-lang/rust/issues/110352.
2023-05-13 10:10:59 +00:00
..
rustc fix link 2023-03-11 10:53:47 -06:00
rustc_abi Reorder to keep duplicate checks in sync. 2023-05-05 16:30:32 -07:00
rustc_apfloat
rustc_arena Deny the unsafe_op_in_unsafe_fn lint in 2023-04-28 21:00:54 -07:00
rustc_ast Rollup merge of #111215 - BoxyUwU:resolve_anon_consts_differently, r=cjgillot 2023-05-09 20:49:32 +02:00
rustc_ast_lowering Require impl Trait in associated types to appear in method signatures 2023-05-12 10:24:03 +00:00
rustc_ast_passes Add feature gate 2023-05-05 21:44:48 +02:00
rustc_ast_pretty Migrate offset_of from a macro to builtin # syntax 2023-05-05 21:44:13 +02:00
rustc_attr Improve check-cfg diagnostics (part 2) 2023-05-05 13:06:48 +02:00
rustc_baked_icu_data Regen baked data 2023-05-02 10:45:16 -07:00
rustc_borrowck Rollup merge of #110454 - oli-obk:limited_impl_trait_in_assoc_type, r=compiler-errors 2023-05-13 11:05:32 +05:30
rustc_builtin_macros Auto merge of #109732 - Urgau:uplift_drop_forget_ref_lints, r=davidtwco 2023-05-12 12:04:32 +00:00
rustc_codegen_cranelift use EarlyBinder in tcx.(try_)subst_mir_and_normalize_erasing_regions 2023-05-06 22:32:39 -06:00
rustc_codegen_gcc Add todo for filter landing pad 2023-05-07 12:38:47 +01:00
rustc_codegen_llvm Rollup merge of #111375 - rcvalle:rust-cfi-fix-106547, r=bjorn3 2023-05-11 17:43:07 -07:00
rustc_codegen_ssa Rollup merge of #111393 - klensy:win-0.48, r=oli-obk 2023-05-12 07:11:12 +02:00
rustc_const_eval use EarlyBinder in tcx.(try_)subst_mir_and_normalize_erasing_regions 2023-05-06 22:32:39 -06:00
rustc_data_structures Rollup merge of #111393 - klensy:win-0.48, r=oli-obk 2023-05-12 07:11:12 +02:00
rustc_driver
rustc_driver_impl bump windows crate 0.46 -> 0.48 in workspace 2023-05-09 18:20:13 +03:00
rustc_error_codes Rollup merge of #111215 - BoxyUwU:resolve_anon_consts_differently, r=cjgillot 2023-05-09 20:49:32 +02:00
rustc_error_messages Rollup merge of #111104 - Manishearth:icuup, r=compiler-errors 2023-05-03 16:42:50 -07:00
rustc_errors bump windows crate 0.46 -> 0.48 in workspace 2023-05-09 18:20:13 +03:00
rustc_expand Rollup merge of #108801 - fee1-dead-contrib:c-str, r=compiler-errors 2023-05-05 18:40:33 +05:30
rustc_feature Add support for cfg(overflow_checks) 2023-05-11 18:06:31 +04:00
rustc_fluent_macro Remove unused synstructure dep 2023-04-22 22:03:33 +01:00
rustc_fs_util Add try_canonicalize to rustc_fs_util and use it over fs::canonicalize 2023-03-16 21:50:23 +01:00
rustc_graphviz enable rust_2018_idioms for doctests 2023-05-07 00:12:29 +03:00
rustc_hir Require impl Trait in associated types to appear in method signatures 2023-05-12 10:24:03 +00:00
rustc_hir_analysis Add a convenience function 2023-05-12 10:25:34 +00:00
rustc_hir_pretty Rip it out 2023-05-01 16:15:13 +08:00
rustc_hir_typeck Use the opaque_types_defined_by query to cheaply check for whether a hidden type may be registered for an opaque type 2023-05-12 10:26:50 +00:00
rustc_incremental Rollup merge of #111024 - saethlin:stringify-full-svh, r=oli-obk 2023-05-04 08:09:04 +02:00
rustc_index Decorative changes to IndexVec 2023-04-24 13:53:37 +00:00
rustc_infer Rollup merge of #110454 - oli-obk:limited_impl_trait_in_assoc_type, r=compiler-errors 2023-05-13 11:05:32 +05:30
rustc_interface Rollup merge of #111292 - Urgau:check-cfg-issue-111291, r=petrochenkov 2023-05-11 07:05:27 +02:00
rustc_lexer address comments 2023-05-02 10:32:07 +00:00
rustc_lint Auto merge of #109732 - Urgau:uplift_drop_forget_ref_lints, r=davidtwco 2023-05-12 12:04:32 +00:00
rustc_lint_defs Auto merge of #106621 - ozkanonur:enable-elided-lifetimes-for-doctests, r=Mark-Simulacrum 2023-05-08 04:50:28 +00:00
rustc_llvm Usage of atomic counters for llvm code coverage 2023-05-12 01:40:04 +03:00
rustc_log Stabilize IsTerminal 2023-04-10 17:24:23 +09:00
rustc_macros Rollup merge of #111120 - chenyukang:yukang-suggest-let, r=Nilstrieb 2023-05-09 12:33:46 +05:30
rustc_metadata Auto merge of #110699 - jyn514:simulate-remapped-already-remapped, r=cjgillot 2023-05-13 10:10:59 +00:00
rustc_middle Rollup merge of #111451 - compiler-errors:note-cast-origin, r=b-naber 2023-05-13 11:05:33 +05:30
rustc_mir_build Rollup merge of #108705 - clubby789:refutable-let-closure-borrow, r=cjgillot 2023-05-11 07:05:26 +02:00
rustc_mir_dataflow Auto merge of #110820 - cjgillot:faster-dcp, r=oli-obk 2023-05-10 20:54:31 +00:00
rustc_mir_transform Rollup merge of #111441 - cjgillot:issue-111422, r=JakobDegen 2023-05-12 07:11:13 +02:00
rustc_monomorphize use EarlyBinder in tcx.(try_)subst_mir_and_normalize_erasing_regions 2023-05-06 22:32:39 -06:00
rustc_parse Rollup merge of #111120 - chenyukang:yukang-suggest-let, r=Nilstrieb 2023-05-09 12:33:46 +05:30
rustc_parse_format Fix typos in compiler 2023-04-10 22:02:52 +02:00
rustc_passes Auto merge of #111014 - klensy:no-rc, r=WaffleLapkin 2023-05-04 20:49:23 +00:00
rustc_plugin_impl Add rustc_fluent_macro to decouple fluent from rustc_macros 2023-04-18 18:56:22 +00:00
rustc_privacy Auto merge of #111371 - compiler-errors:revert-110907, r=petrochenkov 2023-05-09 15:16:17 +00:00
rustc_query_impl Remove QueryEngine trait 2023-04-26 07:46:13 +02:00
rustc_query_system Restrict From<S> for {D,Subd}iagnosticMessage. 2023-05-03 08:44:39 +10:00
rustc_resolve Rollup merge of #111460 - clubby789:lowercase-box-self, r=compiler-errors 2023-05-11 17:43:09 -07:00
rustc_serialize Factor out more repeated code in {write,read}_leb128!. 2023-05-04 13:52:14 +10:00
rustc_session Rollup merge of #111096 - AngelicosPhosphoros:overflow_checks_issue_91130, r=petrochenkov 2023-05-13 11:05:33 +05:30
rustc_smir Encode types in SMIR 2023-05-08 14:23:19 +00:00
rustc_span Add support for cfg(overflow_checks) 2023-05-11 18:06:31 +04:00
rustc_symbol_mangling CFI: Fix SIGILL reached via trait objects 2023-05-09 20:04:19 +00:00
rustc_target asm: loongarch64: Drop efiapi 2023-05-12 17:22:47 +08:00
rustc_trait_selection Note base types of coercion 2023-05-12 00:10:52 +00:00
rustc_traits IAT: Introduce AliasKind::Inherent 2023-05-04 16:59:10 +02:00
rustc_transmute Remove unused TypeFoldable/TypeVisitable impls. 2023-04-26 15:19:50 +10:00
rustc_ty_utils Use the opaque_types_defined_by query to cheaply check for whether a hidden type may be registered for an opaque type 2023-05-12 10:26:50 +00:00
rustc_type_ir Rollup merge of #111366 - obeis:ascribe-user-type-variance, r=lcnr 2023-05-11 17:43:07 -07:00