We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3991e73 + 89a23bf commit 5c7a045Copy full SHA for 5c7a045
src/test/ui/consts/const-eval/issue-85907.rs
@@ -0,0 +1,7 @@
1
+const fn hey() -> usize {
2
+ panic!(123); //~ ERROR argument to `panic!()` in a const context must have type `&str`
3
+}
4
+
5
+fn main() {
6
+ let _: [u8; hey()] = todo!();
7
src/test/ui/consts/const-eval/issue-85907.stderr
@@ -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)
8
9
+error: aborting due to previous error
10
0 commit comments