diff options
Diffstat (limited to 'tests/ui/consts/const-eval/issue-52475.rs')
-rw-r--r-- | tests/ui/consts/const-eval/issue-52475.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/consts/const-eval/issue-52475.rs b/tests/ui/consts/const-eval/issue-52475.rs new file mode 100644 index 000000000..ce65407bb --- /dev/null +++ b/tests/ui/consts/const-eval/issue-52475.rs @@ -0,0 +1,11 @@ +fn main() { + let _ = [(); { + let mut x = &0; + let mut n = 0; + while n < 5 { + n = (n + 1) % 5; //~ ERROR evaluation of constant value failed + x = &0; // Materialize a new AllocId + } + 0 + }]; +} |