rust/compiler
Matthias Krüger 9ccbbda6ac
Rollup merge of #122290 - RalfJung:mir-printing, r=compiler-errors
MIR printing: print the path of uneval'd const

Currently it just prints `const _` which makes it impossible to say which constant is being referred to.

Also refer to promoteds in a consistent way; previously MIR printing would do
```
promoted[0] in C1: &Option<Cell<i32>> = {
    // ...
}
```
Now that should be
```
const C1::promoted[0]: &Option<Cell<i32>> = {
    // ...
}
```

We don't seem to have a test for that so I tried it by hand, it seems to work:
```
const main::promoted[12]: &[&str; 3] = {
    let mut _0: &[&str; 3];
    let mut _1: [&str; 3];
    let mut _2: &str;
    let mut _3: &str;
    let mut _4: &str;
    let mut _5: &str;

    bb0: {
        _3 = const "b";
        _2 = &(*_3);
        _5 = const "c";
        _4 = &(*_5);
        _1 = [const "a", move _2, move _4];
        _0 = &_1;
        return;
    }
}
```
2024-03-10 22:16:43 +01:00
..
rustc Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_abi Rollup merge of #121382 - nnethercote:rework-untranslatable_diagnostic-lint, r=davidtwco 2024-03-06 22:02:46 +01:00
rustc_arena rename ptr::invalid -> ptr::without_provenance 2024-02-21 20:15:52 +01:00
rustc_ast Rollup merge of #119365 - nbdd0121:asm-goto, r=Amanieu 2024-03-08 08:19:17 +01:00
rustc_ast_ir Fix typo in VisitorResult 2024-03-08 23:20:29 -05:00
rustc_ast_lowering Rollup merge of #121563 - Jarcho:use_cf, r=petrochenkov 2024-03-08 13:22:26 +01:00
rustc_ast_passes bump itertools to 0.12 2024-03-08 12:34:05 +03:00
rustc_ast_pretty Rollup merge of #121584 - klensy:itertools-up, r=Mark-Simulacrum 2024-03-09 21:40:08 +01:00
rustc_attr Rewrite the untranslatable_diagnostic lint. 2024-03-06 14:19:01 +11:00
rustc_baked_icu_data Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_borrowck Auto merge of #121662 - saethlin:precondition-unification, r=RalfJung 2024-03-10 01:23:54 +00:00
rustc_builtin_macros Rollup merge of #121563 - Jarcho:use_cf, r=petrochenkov 2024-03-08 13:22:26 +01:00
rustc_codegen_cranelift use Instance::expect_resolve() instead of unwraping Instance::resolve() 2024-03-10 11:49:33 +01:00
rustc_codegen_gcc use Instance::expect_resolve() instead of unwraping Instance::resolve() 2024-03-10 11:49:33 +01:00
rustc_codegen_llvm use Instance::expect_resolve() instead of unwraping Instance::resolve() 2024-03-10 11:49:33 +01:00
rustc_codegen_ssa use Instance::expect_resolve() instead of unwraping Instance::resolve() 2024-03-10 11:49:33 +01:00
rustc_const_eval Rollup merge of #122290 - RalfJung:mir-printing, r=compiler-errors 2024-03-10 22:16:43 +01:00
rustc_data_structures Rollup merge of #120976 - matthiaskrgr:constify_TL_statics, r=lcnr 2024-03-04 22:16:30 +01:00
rustc_driver Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_driver_impl Rollup merge of #122187 - bjorn3:merge_header_version_checks, r=petrochenkov 2024-03-09 16:21:17 +01:00
rustc_error_codes Improve error message for opaque captures 2024-03-08 19:08:13 +00:00
rustc_error_messages Rename SubdiagnosticMessage as SubdiagMessage. 2024-03-05 12:14:49 +11:00
rustc_errors Rollup merge of #121382 - nnethercote:rework-untranslatable_diagnostic-lint, r=davidtwco 2024-03-06 22:02:46 +01:00
rustc_expand Rollup merge of #121382 - nnethercote:rework-untranslatable_diagnostic-lint, r=davidtwco 2024-03-06 22:02:46 +01:00
rustc_feature Rollup merge of #119365 - nbdd0121:asm-goto, r=Amanieu 2024-03-08 08:19:17 +01:00
rustc_fluent_macro Rename SubdiagnosticMessage as SubdiagMessage. 2024-03-05 12:14:49 +11:00
rustc_fs_util Invert diagnostic lints. 2024-02-06 13:12:33 +11:00
rustc_graphviz Invert diagnostic lints. 2024-02-06 13:12:33 +11:00
rustc_hir Rollup merge of #122103 - compiler-errors:taits-capture-everything, r=oli-obk 2024-03-08 08:19:20 +01:00
rustc_hir_analysis Auto merge of #121662 - saethlin:precondition-unification, r=RalfJung 2024-03-10 01:23:54 +00:00
rustc_hir_pretty Add asm label support to AST and HIR 2024-02-24 18:49:39 +00:00
rustc_hir_typeck Rollup merge of #121584 - klensy:itertools-up, r=Mark-Simulacrum 2024-03-09 21:40:08 +01:00
rustc_incremental Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
rustc_index doc: Add better explanation 2024-03-06 16:54:42 +01:00
rustc_index_macros Step all bootstrap cfgs forward 2024-02-08 07:44:34 -05:00
rustc_infer Rollup merge of #121860 - mu001999:master, r=Nilstrieb 2024-03-10 10:58:16 +01:00
rustc_interface Some tweaks to the parallel query cycle handler 2024-03-09 00:24:14 +01:00
rustc_lexer Invert diagnostic lints. 2024-02-06 13:12:33 +11:00
rustc_lint Rollup merge of #121860 - mu001999:master, r=Nilstrieb 2024-03-10 10:58:16 +01:00
rustc_lint_defs Declare new lint 2024-03-09 01:13:42 +01:00
rustc_llvm Rollup merge of #122143 - durin42:llvm-19-compression-options, r=workingjubilee 2024-03-08 08:19:20 +01:00
rustc_log rustc_log: expose tracing-tree "wraparound" in an env var 2024-03-03 12:33:26 +01:00
rustc_macros Convert TypeVisitor and DefIdVisitor to use VisitorResult 2024-03-05 13:28:15 -05:00
rustc_metadata Rollup merge of #122187 - bjorn3:merge_header_version_checks, r=petrochenkov 2024-03-09 16:21:17 +01:00
rustc_middle MIR printing: print the path of uneval'd const; refer to promoteds in a consistent way 2024-03-10 14:59:41 +01:00
rustc_mir_build Rollup merge of #122221 - Nadrieril:patextradata, r=oli-obk 2024-03-10 10:58:18 +01:00
rustc_mir_dataflow Distinguish between library and lang UB in assert_unsafe_precondition 2024-03-08 18:53:58 -05:00
rustc_mir_transform Auto merge of #121662 - saethlin:precondition-unification, r=RalfJung 2024-03-10 01:23:54 +00:00
rustc_monomorphize use Instance::expect_resolve() instead of unwraping Instance::resolve() 2024-03-10 11:49:33 +01:00
rustc_next_trait_solver Allow a way to add constructors for rustc_type_ir types 2024-03-04 15:39:59 +00:00
rustc_parse Rollup merge of #121860 - mu001999:master, r=Nilstrieb 2024-03-10 10:58:16 +01:00
rustc_parse_format remove a couple of redundant clones 2024-02-17 12:46:18 +01:00
rustc_passes Rollup merge of #121860 - mu001999:master, r=Nilstrieb 2024-03-10 10:58:16 +01:00
rustc_pattern_analysis Lint small gaps between ranges 2024-03-09 01:14:22 +01:00
rustc_privacy Convert SpannedTypeVisitor to use VisitorResult 2024-03-05 13:30:46 -05:00
rustc_query_impl Avoid using unnecessary queries when printing the query stack in panics 2024-03-04 20:43:58 +01:00
rustc_query_system Auto merge of #122064 - Zoxc:dep-graph-encode-tweaks, r=cjgillot 2024-03-10 06:27:41 +00:00
rustc_resolve Rollup merge of #119365 - nbdd0121:asm-goto, r=Amanieu 2024-03-08 08:19:17 +01:00
rustc_serialize Replace NonZero::<_>::new with NonZero::new. 2024-02-15 08:09:42 +01:00
rustc_session Rollup merge of #121959 - sundeep-kokkonda:patch-2, r=davidtwco 2024-03-06 22:02:47 +01:00
rustc_smir Distinguish between library and lang UB in assert_unsafe_precondition 2024-03-08 18:53:58 -05:00
rustc_span fix legacy numeric constant diag items 2024-03-09 23:33:27 -07:00
rustc_symbol_mangling Rollup merge of #121841 - tgross35:f16-f128-step2-intrinsics, r=compiler-errors 2024-03-02 20:13:24 +01:00
rustc_target Rollup merge of #122157 - dpaoliello:targetdesc, r=Nilstrieb 2024-03-08 21:02:01 +01:00
rustc_trait_selection Rollup merge of #121584 - klensy:itertools-up, r=Mark-Simulacrum 2024-03-09 21:40:08 +01:00
rustc_traits Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
rustc_transmute bump itertools to 0.12 2024-03-08 12:34:05 +03:00
rustc_ty_utils Rollup merge of #121584 - klensy:itertools-up, r=Mark-Simulacrum 2024-03-09 21:40:08 +01:00
rustc_type_ir Remove Ord from ClosureKind 2024-03-09 21:16:43 +08:00
stable_mir Distinguish between library and lang UB in assert_unsafe_precondition 2024-03-08 18:53:58 -05:00