Skip to content

Commit b8baaaa

Browse files
committed
move a new crash test to ui, fixed by checking the whole body
1 parent ade5b67 commit b8baaaa

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

tests/crashes/117696-1.rs renamed to tests/ui/codegen/normalization-overflow/recursion-issue-117696-1.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ known-bug: #117696
1+
//@ build-fail
22
fn main() {
33
let mut it = (Empty);
44
rec(&mut it);
@@ -23,6 +23,7 @@ where
2323
{
2424
if () == () {
2525
T::count(it);
26+
//~^ ERROR: reached the recursion limit while instantiating
2627
} else {
2728
rec(identity(&mut it))
2829
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error: reached the recursion limit while instantiating `<&mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut &mut Empty as Iterator>::count`
2+
--> $DIR/recursion-issue-117696-1.rs:25:9
3+
|
4+
LL | T::count(it);
5+
| ^^^^^^^^^^^^
6+
|
7+
note: `count` defined here
8+
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
9+
10+
error: aborting due to 1 previous error
11+

0 commit comments

Comments
 (0)