about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-08-10 16:47:26 +0000
committerMichael Goulet <michael@errs.io>2022-11-10 21:18:06 +0000
commit43ad19b2506c4e4ce6204e3ecf8b35869bd76eff (patch)
tree3cf31eff255d92a082f6164c25380c011ffe2cd2
parent8ec6c84bb31f9b403b0b25bc4685ece5c744cb48 (diff)
downloadrust-43ad19b2506c4e4ce6204e3ecf8b35869bd76eff.tar.gz
rust-43ad19b2506c4e4ce6204e3ecf8b35869bd76eff.zip
bless tests
-rw-r--r--src/test/ui/generic-associated-types/bugs/issue-80626.rs7
-rw-r--r--src/test/ui/generic-associated-types/bugs/issue-80626.stderr15
-rw-r--r--src/test/ui/generic-associated-types/issue-87750.rs8
-rw-r--r--src/test/ui/generic-associated-types/issue-87750.stderr9
-rw-r--r--src/test/ui/generic-associated-types/projection-bound-cycle-generic.rs2
-rw-r--r--src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr14
-rw-r--r--src/test/ui/generic-associated-types/projection-bound-cycle.rs2
-rw-r--r--src/test/ui/generic-associated-types/projection-bound-cycle.stderr14
-rw-r--r--src/test/ui/sized/recursive-type-2.stderr3
-rw-r--r--src/test/ui/traits/issue-82830.rs4
-rw-r--r--src/test/ui/traits/issue-82830.stderr15
11 files changed, 23 insertions, 70 deletions
diff --git a/src/test/ui/generic-associated-types/bugs/issue-80626.rs b/src/test/ui/generic-associated-types/bugs/issue-80626.rs
index f6aa6b36e13..d6e18010f3b 100644
--- a/src/test/ui/generic-associated-types/bugs/issue-80626.rs
+++ b/src/test/ui/generic-associated-types/bugs/issue-80626.rs
@@ -1,7 +1,4 @@
-// check-fail
-// known-bug: #80626
-
-// This should pass, but it requires `Sized` to be coinductive.
+// check-pass
 
 trait Allocator {
     type Allocated<T>;
@@ -9,7 +6,7 @@ trait Allocator {
 
 enum LinkedList<A: Allocator> {
     Head,
-    Next(A::Allocated<Self>)
+    Next(A::Allocated<Self>),
 }
 
 fn main() {}
diff --git a/src/test/ui/generic-associated-types/bugs/issue-80626.stderr b/src/test/ui/generic-associated-types/bugs/issue-80626.stderr
deleted file mode 100644
index 9a0f332ed47..00000000000
--- a/src/test/ui/generic-associated-types/bugs/issue-80626.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0275]: overflow evaluating the requirement `LinkedList<A>: Sized`
-  --> $DIR/issue-80626.rs:12:10
-   |
-LL |     Next(A::Allocated<Self>)
-   |          ^^^^^^^^^^^^^^^^^^
-   |
-note: required by a bound in `Allocator::Allocated`
-  --> $DIR/issue-80626.rs:7:20
-   |
-LL |     type Allocated<T>;
-   |                    ^ required by this bound in `Allocator::Allocated`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0275`.
diff --git a/src/test/ui/generic-associated-types/issue-87750.rs b/src/test/ui/generic-associated-types/issue-87750.rs
index 0a11a0f3ae0..b35657989ef 100644
--- a/src/test/ui/generic-associated-types/issue-87750.rs
+++ b/src/test/ui/generic-associated-types/issue-87750.rs
@@ -1,3 +1,5 @@
+// check-pass
+
 trait PointerFamily {
     type Pointer<T>;
 }
@@ -10,11 +12,13 @@ impl PointerFamily for RcFamily {
 }
 
 #[allow(dead_code)]
-enum Node<T, P: PointerFamily> where P::Pointer<Node<T, P>>: Sized {
+enum Node<T, P: PointerFamily>
+where
+    P::Pointer<Node<T, P>>: Sized,
+{
     Cons(P::Pointer<Node<T, P>>),
 }
 
 fn main() {
     let _list: <RcFamily as PointerFamily>::Pointer<Node<i32, RcFamily>>;
-    //~^ ERROR overflow evaluating the requirement `Node<i32, RcFamily>: Sized`
 }
diff --git a/src/test/ui/generic-associated-types/issue-87750.stderr b/src/test/ui/generic-associated-types/issue-87750.stderr
deleted file mode 100644
index b358ca273ca..00000000000
--- a/src/test/ui/generic-associated-types/issue-87750.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0275]: overflow evaluating the requirement `Node<i32, RcFamily>: Sized`
-  --> $DIR/issue-87750.rs:18:16
-   |
-LL |     let _list: <RcFamily as PointerFamily>::Pointer<Node<i32, RcFamily>>;
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0275`.
diff --git a/src/test/ui/generic-associated-types/projection-bound-cycle-generic.rs b/src/test/ui/generic-associated-types/projection-bound-cycle-generic.rs
index 58d57df63c1..ecf6f69c9fa 100644
--- a/src/test/ui/generic-associated-types/projection-bound-cycle-generic.rs
+++ b/src/test/ui/generic-associated-types/projection-bound-cycle-generic.rs
@@ -21,6 +21,7 @@ impl<T> Foo for Number<T> {
     // ```
     // which it is :)
     type Item = [T] where [T]: Sized;
+    //~^ ERROR overflow evaluating the requirement `<Number<T> as Foo>::Item == _`
 }
 
 struct OnlySized<T> where T: Sized { f: T }
@@ -40,7 +41,6 @@ impl<T> Bar for T where T: Foo {
     // can use the bound on `Foo::Item` for this, but that requires
     // `wf(<T as Foo>::Item)`, which is an invalid cycle.
     type Assoc = OnlySized<<T as Foo>::Item>;
-    //~^ ERROR overflow evaluating the requirement `<T as Foo>::Item: Sized`
 }
 
 fn foo<T: Print>() {
diff --git a/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr b/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr
index 27c1a82994a..aae9a56bb61 100644
--- a/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr
+++ b/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr
@@ -1,14 +1,8 @@
-error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
-  --> $DIR/projection-bound-cycle-generic.rs:42:18
+error[E0275]: overflow evaluating the requirement `<Number<T> as Foo>::Item == _`
+  --> $DIR/projection-bound-cycle-generic.rs:23:5
    |
-LL |     type Assoc = OnlySized<<T as Foo>::Item>;
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: required by a bound in `OnlySized`
-  --> $DIR/projection-bound-cycle-generic.rs:26:18
-   |
-LL | struct OnlySized<T> where T: Sized { f: T }
-   |                  ^ required by this bound in `OnlySized`
+LL |     type Item = [T] where [T]: Sized;
+   |     ^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/generic-associated-types/projection-bound-cycle.rs b/src/test/ui/generic-associated-types/projection-bound-cycle.rs
index 4cad1f61319..b51ae7ef201 100644
--- a/src/test/ui/generic-associated-types/projection-bound-cycle.rs
+++ b/src/test/ui/generic-associated-types/projection-bound-cycle.rs
@@ -24,6 +24,7 @@ impl Foo for Number {
     // ```
     // which it is :)
     type Item = str where str: Sized;
+    //~^ ERROR overflow evaluating the requirement `<Number as Foo>::Item == _`
 }
 
 struct OnlySized<T> where T: Sized { f: T }
@@ -43,7 +44,6 @@ impl<T> Bar for T where T: Foo {
     // can use the bound on `Foo::Item` for this, but that requires
     // `wf(<T as Foo>::Item)`, which is an invalid cycle.
     type Assoc = OnlySized<<T as Foo>::Item>;
-    //~^ ERROR overflow evaluating the requirement `<T as Foo>::Item: Sized`
 }
 
 fn foo<T: Print>() {
diff --git a/src/test/ui/generic-associated-types/projection-bound-cycle.stderr b/src/test/ui/generic-associated-types/projection-bound-cycle.stderr
index a46518c80da..b1b8afeecd0 100644
--- a/src/test/ui/generic-associated-types/projection-bound-cycle.stderr
+++ b/src/test/ui/generic-associated-types/projection-bound-cycle.stderr
@@ -1,14 +1,8 @@
-error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
-  --> $DIR/projection-bound-cycle.rs:45:18
+error[E0275]: overflow evaluating the requirement `<Number as Foo>::Item == _`
+  --> $DIR/projection-bound-cycle.rs:26:5
    |
-LL |     type Assoc = OnlySized<<T as Foo>::Item>;
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: required by a bound in `OnlySized`
-  --> $DIR/projection-bound-cycle.rs:29:18
-   |
-LL | struct OnlySized<T> where T: Sized { f: T }
-   |                  ^ required by this bound in `OnlySized`
+LL |     type Item = str where str: Sized;
+   |     ^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/sized/recursive-type-2.stderr b/src/test/ui/sized/recursive-type-2.stderr
index 2102c934da3..d0e6e9db07e 100644
--- a/src/test/ui/sized/recursive-type-2.stderr
+++ b/src/test/ui/sized/recursive-type-2.stderr
@@ -1,7 +1,8 @@
 error[E0391]: cycle detected when computing layout of `Foo<()>`
    |
+   = note: ...which requires computing layout of `<() as A>::Assoc`...
    = note: ...which again requires computing layout of `Foo<()>`, completing the cycle
-note: cycle used when optimizing MIR for `main`
+note: cycle used when elaborating drops for `main`
   --> $DIR/recursive-type-2.rs:11:1
    |
 LL | fn main() {
diff --git a/src/test/ui/traits/issue-82830.rs b/src/test/ui/traits/issue-82830.rs
index c8289b2e30b..37bae2e90a5 100644
--- a/src/test/ui/traits/issue-82830.rs
+++ b/src/test/ui/traits/issue-82830.rs
@@ -1,10 +1,12 @@
+// check-pass
+
 trait A<Y, N> {
     type B;
 }
 
 type MaybeBox<T> = <T as A<T, Box<T>>>::B;
 struct P {
-    t: MaybeBox<P>, //~ ERROR: overflow evaluating the requirement `P: Sized`
+    t: MaybeBox<P>,
 }
 
 impl<Y, N> A<Y, N> for P {
diff --git a/src/test/ui/traits/issue-82830.stderr b/src/test/ui/traits/issue-82830.stderr
deleted file mode 100644
index 6a597a40215..00000000000
--- a/src/test/ui/traits/issue-82830.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0275]: overflow evaluating the requirement `P: Sized`
-  --> $DIR/issue-82830.rs:7:8
-   |
-LL |     t: MaybeBox<P>,
-   |        ^^^^^^^^^^^
-   |
-note: required for `P` to implement `A<P, Box<P>>`
-  --> $DIR/issue-82830.rs:10:12
-   |
-LL | impl<Y, N> A<Y, N> for P {
-   |            ^^^^^^^     ^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0275`.