Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make broken MIR a proper lint. #119260

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

cjgillot
Copy link
Contributor

This allows to use expect(rustc::broken_mir) when we actually expect it to fire.

cc @tmiasko

@matthiaskrgr this should address #119077 (comment)

@rustbot
Copy link
Collaborator

rustbot commented Dec 23, 2023

r? @TaKO8Ki

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 23, 2023
@rustbot
Copy link
Collaborator

rustbot commented Dec 23, 2023

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

/// The `broken_mir` statically detects undefined behaviour in the MIR optimization pipeline.
/// This is an internal lint, and not intended to be used directly.
pub rustc::BROKEN_MIR,
Deny,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forbid maybe?

Comment on lines +3959 to +3965
crate::declare_tool_lint! {
/// The `broken_mir` statically detects undefined behaviour in the MIR optimization pipeline.
/// This is an internal lint, and not intended to be used directly.
pub rustc::BROKEN_MIR,
Deny,
"broken MIR",
report_in_external_macro: true
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bike-shedding: The term broken MIR is already used when validation fails. It also overstates the severity of what is being reported. Maybe unusual MIR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do believe broken is the right term here

@bors
Copy link
Contributor

bors commented Dec 30, 2023

☔ The latest upstream changes (presumably #119377) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=cjgillot
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_53f513c8-6e44-40c2-9d82-f97c16f29db5
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=f2a1192fde6e746132a7de3d013d8e52adcdcbf8
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_53f513c8-6e44-40c2-9d82-f97c16f29db5
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_53f513c8-6e44-40c2-9d82-f97c16f29db5
GITHUB_TRIGGERING_ACTOR=cjgillot
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/119260/merge
GITHUB_WORKFLOW_SHA=f2a1192fde6e746132a7de3d013d8e52adcdcbf8
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Mon Jan  1 02:45:06 UTC 2024
  network time: Mon, 01 Jan 2024 02:45:06 GMT
  network time: Mon, 01 Jan 2024 02:45:06 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: rust.codegen-units-std := 1
---

error: compilation failed!
status: exit status: 1
Build completed unsuccessfully in 0:13:26
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/mir-opt/reference_prop.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "-O" "-Copt-level=1" "-Zdump-mir=ReferencePropagation | ReferencePropagation | ReferencePropagation | ReferencePropagation | ReferencePropagation | ReferencePropagation | ReferencePropagation | ReferencePropagation | ReferencePropagation | ReferencePropagation | ReferencePropagation" "-Zvalidate-mir" "-Zlint-mir" "-Zdump-mir-exclude-pass-number" "-Zmir-opt-level=0" "-Zmir-enable-passes=+ReferencePropagation" "-Zdump-mir-dir=/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/reference_prop" "--emit" "mir" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/reference_prop" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt/reference_prop/auxiliary"
--- stderr -------------------------------
warning: unused variable: `c`
##[warning]  --> /checkout/tests/mir-opt/reference_prop.rs:22:13
   |
   |
22 |         let c = *b; // This should be optimized.
   |             ^ help: if this is intentional, prefix it with an underscore: `_c`
   = note: `#[warn(unused_variables)]` on by default

warning: value assigned to `b` is never read
##[warning]  --> /checkout/tests/mir-opt/reference_prop.rs:38:17
##[warning]  --> /checkout/tests/mir-opt/reference_prop.rs:38:17
   |
38 |         let mut b = &a;
   |                 ^
   |
   = help: maybe it is overwritten before being read?

warning: unused variable: `c`
##[warning]  --> /checkout/tests/mir-opt/reference_prop.rs:41:13
   |
   |
41 |         let c = *b;
   |             ^ help: if this is intentional, prefix it with an underscore: `_c`

warning: unused variable: `c`
##[warning]  --> /checkout/tests/mir-opt/reference_prop.rs:56:13
   |
56 |         let c = *b; // `b` is immutably borrowed, we know its value, but do not propagate it
   |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `c`
##[warning]  --> /checkout/tests/mir-opt/reference_prop.rs:71:13
   |
   |
71 |         let c = *b; // `b` is mutably borrowed, we cannot know its value.
   |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `c`
##[warning]  --> /checkout/tests/mir-opt/reference_prop.rs:84:13
   |
84 |         let c = *b;
---

warning: unused variable: `b`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:116:13
    |
116 |         let b = *a; // This should be optimized as `*single`.
    |             ^ help: if this is intentional, prefix it with an underscore: `_b`

warning: value assigned to `multiple` is never read
    |
    |
129 |         multiple = &*single;
    |
    |
    = help: maybe it is overwritten before being read?
warning: unused variable: `b`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:130:13
    |
    |
130 |         let b = *a; // This should not be optimized.
    |             ^ help: if this is intentional, prefix it with an underscore: `_b`
warning: unused variable: `d`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:145:13
    |
    |
145 |         let d = &b; // first round promotes debuginfo for `d`
    |             ^ help: if this is intentional, prefix it with an underscore: `_d`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:146:13
    |
    |
146 |         let c = *b; // second round propagates this dereference
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `d`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:161:13
    |
    |
161 |         let d = &mut b; // first round promotes debuginfo for `d`
    |             ^ help: if this is intentional, prefix it with an underscore: `_d`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:162:13
    |
    |
162 |         let c = *b; // second round propagates this dereference
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:179:13
    |
    |
179 |         let c = *b; // This should be optimized.
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: value assigned to `b` is never read
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:195:17
    |
195 |         let mut b = &mut a;
195 |         let mut b = &mut a;
    |                 ^
    |
    = help: maybe it is overwritten before being read?
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:198:13
    |
198 |         let c = *b;
198 |         let c = *b;
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`

warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:213:13
    |
213 |         let c = *b; // `b` is immutably borrowed, we know its value, but cannot be removed.
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:228:13
    |
    |
228 |         let c = *b; // `b` is mutably borrowed, we cannot know its value.
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:241:13
    |
241 |         let c = *b;
---

warning: unused variable: `b`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:273:13
    |
273 |         let b = *a; // This should be optimized as `*single`.
    |             ^ help: if this is intentional, prefix it with an underscore: `_b`

warning: value assigned to `multiple` is never read
    |
    |
286 |         multiple = &mut *single;
    |
    |
    = help: maybe it is overwritten before being read?
warning: unused variable: `b`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:287:13
    |
    |
287 |         let b = *a; // This should not be optimized.
    |             ^ help: if this is intentional, prefix it with an underscore: `_b`
warning: unused variable: `d`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:302:13
    |
    |
302 |         let d = &b; // first round promotes debuginfo for `d`
    |             ^ help: if this is intentional, prefix it with an underscore: `_d`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:303:13
    |
    |
303 |         let c = *b; // second round propagates this dereference
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `d`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:318:13
    |
    |
318 |         let d = &mut b; // first round promotes debuginfo for `d`
    |             ^ help: if this is intentional, prefix it with an underscore: `_d`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:319:13
    |
    |
319 |         let c = *b; // second round propagates this dereference
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:336:13
    |
    |
336 |         let c = *b; // This should be optimized.
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: value assigned to `b` is never read
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:352:17
    |
    |
352 |         let mut b = &raw const a;
    |
    |
    = help: maybe it is overwritten before being read?
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:355:13
    |
355 |         let c = *b;
355 |         let c = *b;
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`

warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:370:13
    |
370 |         let c = *b; // `b` is immutably borrowed, we know its value, but cannot be removed.
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:385:13
    |
    |
385 |         let c = *b; // `b` is mutably borrowed, we cannot know its value.
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:398:13
    |
398 |         let c = *b;
---

warning: unused variable: `b`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:430:13
    |
430 |         let b = *a; // This should be optimized as `*single`.
    |             ^ help: if this is intentional, prefix it with an underscore: `_b`

warning: value assigned to `multiple` is never read
    |
    |
443 |         multiple = &raw const *single;
    |
    |
    = help: maybe it is overwritten before being read?
warning: unused variable: `b`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:444:13
    |
    |
444 |         let b = *a; // This should not be optimized.
    |             ^ help: if this is intentional, prefix it with an underscore: `_b`
warning: unused variable: `e`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:459:13
    |
459 |         let e = *c;
459 |         let e = *c;
    |             ^ help: if this is intentional, prefix it with an underscore: `_e`

warning: unused variable: `d`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:474:13
    |
474 |         let d = &b; // first round promotes debuginfo for `d`
    |             ^ help: if this is intentional, prefix it with an underscore: `_d`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:475:13
    |
    |
475 |         let c = *b; // second round propagates this dereference
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `d`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:490:13
    |
    |
490 |         let d = &mut b; // first round promotes debuginfo for `d`
    |             ^ help: if this is intentional, prefix it with an underscore: `_d`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:491:13
    |
    |
491 |         let c = *b; // second round propagates this dereference
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:508:13
    |
    |
508 |         let c = *b; // This should be optimized.
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: value assigned to `b` is never read
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:524:17
    |
    |
524 |         let mut b = &raw mut a;
    |
    |
    = help: maybe it is overwritten before being read?
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:527:13
    |
527 |         let c = *b;
527 |         let c = *b;
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`

warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:542:13
    |
542 |         let c = *b; // `b` is immutably borrowed, we know its value, but cannot be removed.
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:557:13
    |
    |
557 |         let c = *b; // `b` is mutably borrowed, we cannot know its value.
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:570:13
    |
570 |         let c = *b;
---

warning: unused variable: `b`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:602:13
    |
602 |         let b = *a; // This should be optimized as `*single`.
    |             ^ help: if this is intentional, prefix it with an underscore: `_b`

warning: value assigned to `multiple` is never read
    |
    |
615 |         multiple = &raw mut *single;
    |
    |
    = help: maybe it is overwritten before being read?
warning: unused variable: `b`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:616:13
    |
    |
616 |         let b = *a; // This should not be optimized.
    |             ^ help: if this is intentional, prefix it with an underscore: `_b`
warning: unused variable: `d`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:631:13
    |
    |
631 |         let d = &b; // first round promotes debuginfo for `d`
    |             ^ help: if this is intentional, prefix it with an underscore: `_d`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:632:13
    |
    |
632 |         let c = *b; // second round propagates this dereference
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: unused variable: `d`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:647:13
    |
    |
647 |         let d = &mut b; // first round promotes debuginfo for `d`
    |             ^ help: if this is intentional, prefix it with an underscore: `_d`
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:648:13
    |
    |
648 |         let c = *b; // second round propagates this dereference
    |             ^ help: if this is intentional, prefix it with an underscore: `_c`
warning: value assigned to `RET` is never read
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:674:13
    |
674 |             RET = *p1;
674 |             RET = *p1;
    |             ^^^
    |
    = help: maybe it is overwritten before being read?
warning: unused variable: `c`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:718:13
    |
718 |         let c: i32;
718 |         let c: i32;
    |             ^
    |
help: `c` is captured in macro and introduced a unused variable
    |
715 | /     mir!(
716 | |         let x: i32;
716 | |         let x: i32;
717 | |         let r: &i32;
718 | |         let c: i32;
735 | |         }
736 | |     )
    | |_____^
    = note: this warning originates in the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
    = note: this warning originates in the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: unused variable: `d`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:719:13
    |
719 |         let d: bool;
    |             ^
    |
help: `d` is captured in macro and introduced a unused variable
    |
715 | /     mir!(
716 | |         let x: i32;
716 | |         let x: i32;
717 | |         let r: &i32;
718 | |         let c: i32;
735 | |         }
736 | |     )
    | |_____^
    = note: this warning originates in the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
    = note: this warning originates in the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: value assigned to `RET` is never read
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:765:18
    |
765 |             Call(RET = opaque(u), bb2, UnwindContinue())
    |
    |
    = help: maybe it is overwritten before being read?
warning: value assigned to `RET` is never read
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:770:18
    |
    |
770 |             Call(RET = opaque(z), bb3, UnwindContinue())
    |
    |
    = help: maybe it is overwritten before being read?
warning: unused variable: `field`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:837:9
    |
    |
837 |     let field = &T(0).0;
    |         ^^^^^ help: if this is intentional, prefix it with an underscore: `_field`
warning: unused variable: `reborrow`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:840:9
    |
    |
840 |     let reborrow = &*ref_mut_u8;
    |         ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reborrow`
warning: unused variable: `variant_field`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:844:18
    |
844 |         Some(ref variant_field) => {}
844 |         Some(ref variant_field) => {}
    |                  ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_variant_field`

warning: unused variable: `constant_index`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:849:20
    |
849 |     if let [_, ref constant_index, subslice @ .., ref constant_index_from_end] = &[6; 10][..] {
    |                    ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_constant_index`
warning: unused variable: `subslice`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:849:36
    |
    |
849 |     if let [_, ref constant_index, subslice @ .., ref constant_index_from_end] = &[6; 10][..] {
    |                                    ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_subslice`
warning: unused variable: `constant_index_from_end`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:849:55
    |
    |
849 |     if let [_, ref constant_index, subslice @ .., ref constant_index_from_end] = &[6; 10][..] {
    |                                                       ^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_constant_index_from_end`

warning: unused variable: `multiple_borrow`
    |
    |
852 |     let multiple_borrow = &&&mut T(6).0;
    |         ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_multiple_borrow`
warning: unused variable: `many_borrow`
##[warning]   --> /checkout/tests/mir-opt/reference_prop.rs:863:9
    |
863 |     let many_borrow =
863 |     let many_borrow =
    |         ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_many_borrow`

error: broken MIR in Item(DefId(0:16 ~ reference_prop[3863]::multiple_storage)) (after pass RemoveUnneededDrops) at bb1[0]:
       local _1 still has storage when returning from function
    |
703 |             Return()
    |             ^^^^^^^^
    |
    |
    = note: `#[deny(rustc::broken_mir)]` on by default

error: broken MIR in Item(DefId(0:16 ~ reference_prop[3863]::multiple_storage)) (after pass ReferencePropagation) at bb1[0]:
       local _1 still has storage when returning from function
    |
703 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:16 ~ reference_prop[3863]::multiple_storage)) (after pass AddCallGuards) at bb1[0]:
       local _1 still has storage when returning from function
    |
703 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:16 ~ reference_prop[3863]::multiple_storage)) (after pass PreCodegen) at bb1[0]:
       local _1 still has storage when returning from function
    |
703 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:16 ~ reference_prop[3863]::multiple_storage)) (after phase change to runtime-optimized) at bb1[0]:
       local _1 still has storage when returning from function
    |
703 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:18 ~ reference_prop[3863]::dominate_storage)) (after pass RemoveUnneededDrops) at bb1[0]:
       use of local _1, which has no storage here
    |
722 |             x = 5;
    |             ^^^^^


error: broken MIR in Item(DefId(0:18 ~ reference_prop[3863]::dominate_storage)) (after pass RemoveUnneededDrops) at bb1[1]:
       use of local _1, which has no storage here
    |
723 |             r = &x;
    |             ^^^^^^


error: broken MIR in Item(DefId(0:18 ~ reference_prop[3863]::dominate_storage)) (after pass ReferencePropagation) at bb1[0]:
       use of local _1, which has no storage here
    |
722 |             x = 5;
    |             ^^^^^


error: broken MIR in Item(DefId(0:18 ~ reference_prop[3863]::dominate_storage)) (after pass ReferencePropagation) at bb1[1]:
       use of local _1, which has no storage here
    |
723 |             r = &x;
    |             ^^^^^^


error: broken MIR in Item(DefId(0:18 ~ reference_prop[3863]::dominate_storage)) (after pass AddCallGuards) at bb1[0]:
       use of local _1, which has no storage here
    |
722 |             x = 5;
    |             ^^^^^


error: broken MIR in Item(DefId(0:18 ~ reference_prop[3863]::dominate_storage)) (after pass AddCallGuards) at bb1[1]:
       use of local _1, which has no storage here
    |
723 |             r = &x;
    |             ^^^^^^


error: broken MIR in Item(DefId(0:18 ~ reference_prop[3863]::dominate_storage)) (after pass PreCodegen) at bb1[0]:
       use of local _1, which has no storage here
    |
722 |             x = 5;
    |             ^^^^^


error: broken MIR in Item(DefId(0:18 ~ reference_prop[3863]::dominate_storage)) (after pass PreCodegen) at bb1[1]:
       use of local _1, which has no storage here
    |
723 |             r = &x;
    |             ^^^^^^


error: broken MIR in Item(DefId(0:18 ~ reference_prop[3863]::dominate_storage)) (after phase change to runtime-optimized) at bb1[0]:
       use of local _1, which has no storage here
    |
722 |             x = 5;
    |             ^^^^^


error: broken MIR in Item(DefId(0:18 ~ reference_prop[3863]::dominate_storage)) (after phase change to runtime-optimized) at bb1[1]:
       use of local _1, which has no storage here
    |
723 |             r = &x;
    |             ^^^^^^


error: broken MIR in Item(DefId(0:20 ~ reference_prop[3863]::maybe_dead)) (after pass RemoveUnneededDrops) at bb4[0]:
       local _2 still has storage when returning from function
    |
779 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:20 ~ reference_prop[3863]::maybe_dead)) (after pass RemoveUnneededDrops) at bb4[0]:
       local _3 still has storage when returning from function
    |
779 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:20 ~ reference_prop[3863]::maybe_dead)) (after pass ReferencePropagation) at bb4[0]:
       local _2 still has storage when returning from function
    |
779 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:20 ~ reference_prop[3863]::maybe_dead)) (after pass ReferencePropagation) at bb4[0]:
       local _3 still has storage when returning from function
    |
779 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:20 ~ reference_prop[3863]::maybe_dead)) (after pass AddCallGuards) at bb4[0]:
       local _2 still has storage when returning from function
    |
779 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:20 ~ reference_prop[3863]::maybe_dead)) (after pass AddCallGuards) at bb4[0]:
       local _3 still has storage when returning from function
    |
779 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:20 ~ reference_prop[3863]::maybe_dead)) (after pass PreCodegen) at bb4[0]:
       local _2 still has storage when returning from function
    |
779 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:20 ~ reference_prop[3863]::maybe_dead)) (after pass PreCodegen) at bb4[0]:
       local _3 still has storage when returning from function
    |
779 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:20 ~ reference_prop[3863]::maybe_dead)) (after phase change to runtime-optimized) at bb4[0]:
       local _2 still has storage when returning from function
    |
779 |             Return()
    |             ^^^^^^^^


error: broken MIR in Item(DefId(0:20 ~ reference_prop[3863]::maybe_dead)) (after phase change to runtime-optimized) at bb4[0]:
       local _3 still has storage when returning from function
    |
779 |             Return()
    |             ^^^^^^^^

@bors
Copy link
Contributor

bors commented Jan 5, 2024

☔ The latest upstream changes (presumably #119621) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants