Skip to content

Commit dcdfff6

Browse files
authored
Rollup merge of rust-lang#112481 - compiler-errors:new-solver-ignore-bad-tests, r=lqd
Ignore tests that hang in new solver This makes it easier to run `--compare-mode=next-solver`, and we can revisit these tests later to find out how to make them less overflowy 😅 r? `@lcnr`
2 parents fc9fff6 + 3152ac3 commit dcdfff6

8 files changed

+13
-7
lines changed

Diff for: tests/ui/closures/issue-72408-nested-closures-exponential.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// build-pass
2+
// ignore-compare-mode-next-solver (hangs)
23

34
// Closures include captured types twice in a type tree.
45
//

Diff for: tests/ui/issues/issue-37311-type-length-limit/issue-37311.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// build-fail
22
// normalize-stderr-test: ".nll/" -> "/"
3+
// ignore-compare-mode-next-solver (hangs)
34

45
trait Mirror {
56
type Image;

Diff for: tests/ui/issues/issue-37311-type-length-limit/issue-37311.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: reached the recursion limit while instantiating `<(&(&(..., ...), ...), ...) as Foo>::recurse`
2-
--> $DIR/issue-37311.rs:17:9
2+
--> $DIR/issue-37311.rs:18:9
33
|
44
LL | (self, self).recurse();
55
| ^^^^^^^^^^^^^^^^^^^^^^
66
|
77
note: `<T as Foo>::recurse` defined here
8-
--> $DIR/issue-37311.rs:16:5
8+
--> $DIR/issue-37311.rs:17:5
99
|
1010
LL | fn recurse(&self) {
1111
| ^^^^^^^^^^^^^^^^^

Diff for: tests/ui/iterators/issue-58952-filter-type-length.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// run-pass
2+
// ignore-compare-mode-next-solver (hangs)
3+
24
//! This snippet causes the type length to blowup exponentially,
35
//! so check that we don't accidentally exceed the type length limit.
46
// FIXME: Once the size of iterator adaptors is further reduced,

Diff for: tests/ui/recursion/issue-83150.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// compile-flags: -Copt-level=0
33
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
44
//~^^^ ERROR overflow evaluating the requirement
5+
// ignore-compare-mode-next-solver (hangs)
56

67
fn main() {
78
let mut iter = 0u8..1;

Diff for: tests/ui/recursion/issue-83150.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: function cannot return without recursing
2-
--> $DIR/issue-83150.rs:11:1
2+
--> $DIR/issue-83150.rs:12:1
33
|
44
LL | fn func<T: Iterator<Item = u8>>(iter: &mut T) {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
@@ -9,10 +9,10 @@ LL | func(&mut iter.map(|x| x + 1))
99
= help: a `loop` may express intention better if this is on purpose
1010
= note: `#[warn(unconditional_recursion)]` on by default
1111

12-
error[E0275]: overflow evaluating the requirement `Map<&mut std::ops::Range<u8>, [closure@$DIR/issue-83150.rs:12:24: 12:27]>: Iterator`
12+
error[E0275]: overflow evaluating the requirement `Map<&mut std::ops::Range<u8>, [closure@$DIR/issue-83150.rs:13:24: 13:27]>: Iterator`
1313
|
1414
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_83150`)
15-
= note: required for `&mut Map<&mut std::ops::Range<u8>, [closure@$DIR/issue-83150.rs:12:24: 12:27]>` to implement `Iterator`
15+
= note: required for `&mut Map<&mut std::ops::Range<u8>, [closure@$DIR/issue-83150.rs:13:24: 13:27]>` to implement `Iterator`
1616
= note: 65 redundant requirements hidden
1717
= note: required for `&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<&mut Map<..., ...>, ...>, ...>, ...>, ...>, ...>, ...>` to implement `Iterator`
1818
= note: the full type name has been written to '$TEST_BUILD_DIR/recursion/issue-83150/issue-83150.long-type-hash.txt'

Diff for: tests/ui/traits/issue-91949-hangs-on-recursion.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// error-pattern: overflow evaluating the requirement `<std::iter::Empty<()> as Iterator>::Item == ()`
44
// error-pattern: function cannot return without recursing
55
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
6+
// ignore-compare-mode-next-solver (hangs)
67

78
// Regression test for #91949.
89
// This hanged *forever* on 1.56, fixed by #90423.

Diff for: tests/ui/traits/issue-91949-hangs-on-recursion.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: function cannot return without recursing
2-
--> $DIR/issue-91949-hangs-on-recursion.rs:23:1
2+
--> $DIR/issue-91949-hangs-on-recursion.rs:24:1
33
|
44
LL | / fn recurse<T>(elements: T) -> Vec<char>
55
LL | | where
@@ -16,7 +16,7 @@ error[E0275]: overflow evaluating the requirement `<std::iter::Empty<()> as Iter
1616
|
1717
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "512"]` attribute to your crate (`issue_91949_hangs_on_recursion`)
1818
note: required for `IteratorOfWrapped<(), std::iter::Empty<()>>` to implement `Iterator`
19-
--> $DIR/issue-91949-hangs-on-recursion.rs:16:32
19+
--> $DIR/issue-91949-hangs-on-recursion.rs:17:32
2020
|
2121
LL | impl<T, I: Iterator<Item = T>> Iterator for IteratorOfWrapped<T, I> {
2222
| -------- ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)