Skip to content

Commit cd9453c

Browse files
committed
Mark some tests as known-bugs and add the test case from the corresponding issue
1 parent 7cfa521 commit cd9453c

11 files changed

+78
-24
lines changed

src/tools/tidy/src/issues.txt

-1
Original file line numberDiff line numberDiff line change
@@ -4132,7 +4132,6 @@ ui/type-alias-impl-trait/issue-52843.rs
41324132
ui/type-alias-impl-trait/issue-53092-2.rs
41334133
ui/type-alias-impl-trait/issue-53092.rs
41344134
ui/type-alias-impl-trait/issue-53096.rs
4135-
ui/type-alias-impl-trait/issue-53398-cyclic-types.rs
41364135
ui/type-alias-impl-trait/issue-53598.rs
41374136
ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs
41384137
ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs

tests/ui/type-alias-impl-trait/issue-53398-cyclic-types.rs

-10
This file was deleted.

tests/ui/type-alias-impl-trait/issue-53398-cyclic-types.stderr

-9
This file was deleted.

tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.rs renamed to tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#![feature(type_alias_impl_trait)]
2+
//@ known-bug: #109268
23

34
type Foo = impl Fn() -> Foo;
45

56
fn crash(x: Foo) -> Foo {
6-
//~^ ERROR: overflow
77
x
88
}
99

tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.stderr renamed to tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0275]: overflow evaluating the requirement `<Foo as FnOnce<()>>::Output == Foo`
2-
--> $DIR/type-alias-impl-trait-with-cycle-error.rs:5:21
2+
--> $DIR/type-alias-impl-trait-with-cycle-error-1.rs:6:21
33
|
44
LL | fn crash(x: Foo) -> Foo {
55
| ^^^

tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.rs renamed to tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(type_alias_impl_trait)]
2+
//@ known-bug: #109268
23

34
pub trait Bar<T> {
45
type Item;
@@ -7,7 +8,6 @@ pub trait Bar<T> {
78
type Foo = impl Bar<Foo, Item = Foo>;
89

910
fn crash(x: Foo) -> Foo {
10-
//~^ ERROR: overflow
1111
x
1212
}
1313

tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.stderr renamed to tests/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0275]: overflow evaluating the requirement `<Foo as Bar<Foo>>::Item == Foo`
2-
--> $DIR/type-alias-impl-trait-with-cycle-error2.rs:9:21
2+
--> $DIR/type-alias-impl-trait-with-cycle-error-2.rs:10:21
33
|
44
LL | fn crash(x: Foo) -> Foo {
55
| ^^^
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![feature(type_alias_impl_trait)]
2+
//@ known-bug: #109268
3+
4+
type Foo<'a> = impl Fn() -> Foo<'a>;
5+
6+
fn crash<'a>(_: &'a (), x: Foo<'a>) -> Foo<'a> {
7+
x
8+
}
9+
10+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0275]: overflow evaluating the requirement `<Foo<'_> as FnOnce<()>>::Output == Foo<'a>`
2+
--> $DIR/type-alias-impl-trait-with-cycle-error-3.rs:6:40
3+
|
4+
LL | fn crash<'a>(_: &'a (), x: Foo<'a>) -> Foo<'a> {
5+
| ^^^^^^^
6+
7+
error: aborting due to 1 previous error
8+
9+
For more information about this error, try `rustc --explain E0275`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#![feature(type_alias_impl_trait)]
2+
//@ known-bug: trait-system-refactor-initiative#43
3+
4+
trait Id {
5+
type Assoc;
6+
}
7+
impl<T> Id for T {
8+
type Assoc = T;
9+
}
10+
11+
type Ty
12+
where
13+
Ty: Id<Assoc = Ty>,
14+
= impl Sized;
15+
fn define() -> Ty {}
16+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
error[E0275]: overflow evaluating the requirement `Ty: Id`
2+
--> $DIR/type-alias-impl-trait-with-cycle-error-4.rs:11:1
3+
|
4+
LL | type Ty
5+
| ^^^^^^^
6+
|
7+
note: required by a bound on the type alias `Ty`
8+
--> $DIR/type-alias-impl-trait-with-cycle-error-4.rs:13:9
9+
|
10+
LL | Ty: Id<Assoc = Ty>,
11+
| ^^^^^^^^^^^^^^ required by this bound
12+
13+
error[E0275]: overflow evaluating the requirement `Ty: Id`
14+
--> $DIR/type-alias-impl-trait-with-cycle-error-4.rs:15:19
15+
|
16+
LL | fn define() -> Ty {}
17+
| ^^
18+
|
19+
note: required by a bound on the type alias `Ty`
20+
--> $DIR/type-alias-impl-trait-with-cycle-error-4.rs:13:9
21+
|
22+
LL | Ty: Id<Assoc = Ty>,
23+
| ^^^^^^^^^^^^^^ required by this bound
24+
25+
error[E0275]: overflow evaluating the requirement `Ty: Id`
26+
--> $DIR/type-alias-impl-trait-with-cycle-error-4.rs:15:16
27+
|
28+
LL | fn define() -> Ty {}
29+
| ^^
30+
|
31+
note: required by a bound on the type alias `Ty`
32+
--> $DIR/type-alias-impl-trait-with-cycle-error-4.rs:13:9
33+
|
34+
LL | Ty: Id<Assoc = Ty>,
35+
| ^^^^^^^^^^^^^^ required by this bound
36+
37+
error: aborting due to 3 previous errors
38+
39+
For more information about this error, try `rustc --explain E0275`.

0 commit comments

Comments
 (0)