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.
rustc_mir: follow FalseUnwind's real_target edge in qualify_consts.
- Loading branch information
Showing
12 changed files
with
58 additions
and
28 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
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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
fn main() { | ||
[(); & { loop { continue } } ]; //~ ERROR mismatched types | ||
[(); loop { break }]; //~ ERROR mismatched types | ||
[(); {while true {break}; 0}]; //~ ERROR constant contains unimplemented expression type | ||
//~^ WARN denote infinite loops with | ||
[(); { for _ in 0usize.. {}; 0}]; //~ ERROR calls in constants are limited to constant functions | ||
[(); {while true {break}; 0}]; | ||
//~^ ERROR constant contains unimplemented expression type | ||
//~| ERROR constant contains unimplemented expression type | ||
//~| WARN denote infinite loops with | ||
[(); { for _ in 0usize.. {}; 0}]; | ||
//~^ ERROR calls in constants are limited to constant functions | ||
//~| ERROR references in constants may only refer to immutable values | ||
//~| ERROR constant contains unimplemented expression type | ||
//~| ERROR constant contains unimplemented expression type | ||
//~| ERROR evaluation of constant value failed | ||
} |
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
fn main() { | ||
[(); { &loop { break } as *const _ as usize } ]; //~ ERROR unimplemented expression type | ||
//~^ ERROR it is undefined behavior to use this value | ||
[(); { &loop { break } as *const _ as usize } ]; | ||
//~^ ERROR casting pointers to integers in constants is unstable | ||
//~| ERROR it is undefined behavior to use this value | ||
} |
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
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,9 @@ | ||
// run-pass | ||
|
||
// Tests that `loop`s unconditionally-broken-from are allowed in constants. | ||
|
||
const FOO: () = loop { break; }; | ||
|
||
fn main() { | ||
[FOO; { let x; loop { x = 5; break; } x }]; | ||
} |
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
// run-pass | ||
|
||
// Using labeled break in a while loop has caused an illegal instruction being | ||
// generated, and an ICE later. | ||
// | ||
// See https://github.com/rust-lang/rust/issues/51350 for more information. | ||
|
||
const CRASH: () = 'a: while break 'a {}; | ||
//~^ ERROR constant contains unimplemented expression type | ||
|
||
fn main() {} |
This file was deleted.
Oops, something went wrong.