Skip to content

Commit 9c46173

Browse files
Update newly failing UI tests
1 parent 9cce0bc commit 9c46173

4 files changed

+34
-7
lines changed

src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
// check-pass
21
// normalize-stderr-test: "`.*`" -> "`DEF_ID`"
32
// normalize-stdout-test: "`.*`" -> "`DEF_ID`"
43
// edition:2018
54

65
pub async fn f() -> impl std::fmt::Debug {
7-
// rustdoc doesn't care that this is infinitely sized
86
#[derive(Debug)]
9-
enum E {
7+
enum E { //~ ERROR
108
This(E),
119
Unit,
1210
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
error[E0072]: recursive type `DEF_ID` has infinite size
2+
--> $DIR/infinite-recursive-type-impl-trait-return.rs:7:5
3+
|
4+
LL | enum E {
5+
| ^^^^^^
6+
LL | This(E),
7+
| - recursive without indirection
8+
|
9+
help: insert some indirection (e.g., a `DEF_ID`) to break the cycle
10+
|
11+
LL | This(Box<E>),
12+
| ++++ +
13+
14+
error: aborting due to previous error
15+
16+
For more information about this error, try `DEF_ID`.

src/test/rustdoc-ui/infinite-recursive-type-impl-trait.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
// check-pass
2-
31
fn f() -> impl Sized {
4-
// rustdoc doesn't care that this is infinitely sized
5-
enum E {
2+
enum E { //~ ERROR
63
V(E),
74
}
85
unimplemented!()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
error[E0072]: recursive type `f::E` has infinite size
2+
--> $DIR/infinite-recursive-type-impl-trait.rs:2:5
3+
|
4+
LL | enum E {
5+
| ^^^^^^
6+
LL | V(E),
7+
| - recursive without indirection
8+
|
9+
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
10+
|
11+
LL | V(Box<E>),
12+
| ++++ +
13+
14+
error: aborting due to previous error
15+
16+
For more information about this error, try `rustc --explain E0072`.

0 commit comments

Comments
 (0)