-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #98560 - TaKO8Ki:add-regression-test-for-85907, r=Mar…
- Loading branch information
Showing
2 changed files
with
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const fn hey() -> usize { | ||
panic!(123); //~ ERROR argument to `panic!()` in a const context must have type `&str` | ||
} | ||
|
||
fn main() { | ||
let _: [u8; hey()] = todo!(); | ||
} |
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,10 @@ | ||
error: argument to `panic!()` in a const context must have type `&str` | ||
--> $DIR/issue-85907.rs:2:5 | ||
| | ||
LL | panic!(123); | ||
| ^^^^^^^^^^^ | ||
| | ||
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to previous error | ||
|