We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 314da73 commit 7b3e3ffCopy full SHA for 7b3e3ff
src/test/ui/consts/const_discriminant.rs
@@ -4,6 +4,9 @@
4
5
use std::mem::{discriminant, Discriminant};
6
7
+// `discriminant(const_expr)` may get const-propagated.
8
+// As we want to check that const-eval is equal to ordinary exection,
9
+// we wrap `const_expr` with a function which is not const to prevent this.
10
#[inline(never)]
11
fn identity<T>(x: T) -> T { x }
12
0 commit comments