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.
1 parent dd9702a commit 40c2087Copy full SHA for 40c2087
src/test/ui/consts/const-eval/double_check2.rs
@@ -1,12 +1,8 @@
1
// check-pass
2
3
-// This test exhibits undefined behavior, but it is impossible to prevent generally during
4
-// const eval, even if it could be prevented in the cases here if we added expensive and
5
-// complex checks in rustc.
6
-// The reason it's impossible in general
7
-// is that we run into query cycles even *without* UB, just because we're checking for UB.
8
-// We do not detect it if you create references to statics
9
-// in ways that are UB.
+// This test exhibits undefined behavior, but it is very expensive and complex to check for such
+// UB in constants.
+// Thus, we do not detect it if you create references to statics in ways that are UB.
10
11
enum Foo {
12
A = 5,
0 commit comments