about summary refs log tree commit diff
path: root/tests/ui/consts/const-eval/field-access-after-const-eval-fail-in-ty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-eval/field-access-after-const-eval-fail-in-ty.rs')
-rw-r--r--tests/ui/consts/const-eval/field-access-after-const-eval-fail-in-ty.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/consts/const-eval/field-access-after-const-eval-fail-in-ty.rs b/tests/ui/consts/const-eval/field-access-after-const-eval-fail-in-ty.rs
new file mode 100644
index 00000000000..3f1f208459d
--- /dev/null
+++ b/tests/ui/consts/const-eval/field-access-after-const-eval-fail-in-ty.rs
@@ -0,0 +1,5 @@
+// Regression test for issue #120615.
+
+fn main() {
+    [(); loop {}].field; //~ ERROR constant evaluation is taking a long time
+}