forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#130989 - compiler-errors:unsize-opaque, r=e…
…stebank Don't check unsize goal in MIR validation when opaques remain Similarly to `mir_assign_valid_types`, let's just skip when there are opaques. Fixes rust-lang#130921.
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//@ check-pass | ||
//@ compile-flags: -Zvalidate-mir | ||
|
||
fn hello() -> &'static [impl Sized; 0] { | ||
if false { | ||
let x = hello(); | ||
let _: &[i32] = x; | ||
} | ||
&[] | ||
} | ||
|
||
fn main() {} |