Skip to content

Commit 43ad19b

Browse files
bless tests
1 parent 8ec6c84 commit 43ad19b

11 files changed

+23
-70
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
// check-fail
2-
// known-bug: #80626
3-
4-
// This should pass, but it requires `Sized` to be coinductive.
1+
// check-pass
52

63
trait Allocator {
74
type Allocated<T>;
85
}
96

107
enum LinkedList<A: Allocator> {
118
Head,
12-
Next(A::Allocated<Self>)
9+
Next(A::Allocated<Self>),
1310
}
1411

1512
fn main() {}

src/test/ui/generic-associated-types/bugs/issue-80626.stderr

-15
This file was deleted.

src/test/ui/generic-associated-types/issue-87750.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// check-pass
2+
13
trait PointerFamily {
24
type Pointer<T>;
35
}
@@ -10,11 +12,13 @@ impl PointerFamily for RcFamily {
1012
}
1113

1214
#[allow(dead_code)]
13-
enum Node<T, P: PointerFamily> where P::Pointer<Node<T, P>>: Sized {
15+
enum Node<T, P: PointerFamily>
16+
where
17+
P::Pointer<Node<T, P>>: Sized,
18+
{
1419
Cons(P::Pointer<Node<T, P>>),
1520
}
1621

1722
fn main() {
1823
let _list: <RcFamily as PointerFamily>::Pointer<Node<i32, RcFamily>>;
19-
//~^ ERROR overflow evaluating the requirement `Node<i32, RcFamily>: Sized`
2024
}

src/test/ui/generic-associated-types/issue-87750.stderr

-9
This file was deleted.

src/test/ui/generic-associated-types/projection-bound-cycle-generic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ impl<T> Foo for Number<T> {
2121
// ```
2222
// which it is :)
2323
type Item = [T] where [T]: Sized;
24+
//~^ ERROR overflow evaluating the requirement `<Number<T> as Foo>::Item == _`
2425
}
2526

2627
struct OnlySized<T> where T: Sized { f: T }
@@ -40,7 +41,6 @@ impl<T> Bar for T where T: Foo {
4041
// can use the bound on `Foo::Item` for this, but that requires
4142
// `wf(<T as Foo>::Item)`, which is an invalid cycle.
4243
type Assoc = OnlySized<<T as Foo>::Item>;
43-
//~^ ERROR overflow evaluating the requirement `<T as Foo>::Item: Sized`
4444
}
4545

4646
fn foo<T: Print>() {

src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
2-
--> $DIR/projection-bound-cycle-generic.rs:42:18
1+
error[E0275]: overflow evaluating the requirement `<Number<T> as Foo>::Item == _`
2+
--> $DIR/projection-bound-cycle-generic.rs:23:5
33
|
4-
LL | type Assoc = OnlySized<<T as Foo>::Item>;
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6-
|
7-
note: required by a bound in `OnlySized`
8-
--> $DIR/projection-bound-cycle-generic.rs:26:18
9-
|
10-
LL | struct OnlySized<T> where T: Sized { f: T }
11-
| ^ required by this bound in `OnlySized`
4+
LL | type Item = [T] where [T]: Sized;
5+
| ^^^^^^^^^
126

137
error: aborting due to previous error
148

src/test/ui/generic-associated-types/projection-bound-cycle.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ impl Foo for Number {
2424
// ```
2525
// which it is :)
2626
type Item = str where str: Sized;
27+
//~^ ERROR overflow evaluating the requirement `<Number as Foo>::Item == _`
2728
}
2829

2930
struct OnlySized<T> where T: Sized { f: T }
@@ -43,7 +44,6 @@ impl<T> Bar for T where T: Foo {
4344
// can use the bound on `Foo::Item` for this, but that requires
4445
// `wf(<T as Foo>::Item)`, which is an invalid cycle.
4546
type Assoc = OnlySized<<T as Foo>::Item>;
46-
//~^ ERROR overflow evaluating the requirement `<T as Foo>::Item: Sized`
4747
}
4848

4949
fn foo<T: Print>() {

src/test/ui/generic-associated-types/projection-bound-cycle.stderr

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
2-
--> $DIR/projection-bound-cycle.rs:45:18
1+
error[E0275]: overflow evaluating the requirement `<Number as Foo>::Item == _`
2+
--> $DIR/projection-bound-cycle.rs:26:5
33
|
4-
LL | type Assoc = OnlySized<<T as Foo>::Item>;
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6-
|
7-
note: required by a bound in `OnlySized`
8-
--> $DIR/projection-bound-cycle.rs:29:18
9-
|
10-
LL | struct OnlySized<T> where T: Sized { f: T }
11-
| ^ required by this bound in `OnlySized`
4+
LL | type Item = str where str: Sized;
5+
| ^^^^^^^^^
126

137
error: aborting due to previous error
148

src/test/ui/sized/recursive-type-2.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
error[E0391]: cycle detected when computing layout of `Foo<()>`
22
|
3+
= note: ...which requires computing layout of `<() as A>::Assoc`...
34
= note: ...which again requires computing layout of `Foo<()>`, completing the cycle
4-
note: cycle used when optimizing MIR for `main`
5+
note: cycle used when elaborating drops for `main`
56
--> $DIR/recursive-type-2.rs:11:1
67
|
78
LL | fn main() {

src/test/ui/traits/issue-82830.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
// check-pass
2+
13
trait A<Y, N> {
24
type B;
35
}
46

57
type MaybeBox<T> = <T as A<T, Box<T>>>::B;
68
struct P {
7-
t: MaybeBox<P>, //~ ERROR: overflow evaluating the requirement `P: Sized`
9+
t: MaybeBox<P>,
810
}
911

1012
impl<Y, N> A<Y, N> for P {

src/test/ui/traits/issue-82830.stderr

-15
This file was deleted.

0 commit comments

Comments
 (0)