about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2019-01-01 19:08:25 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2019-01-11 03:53:30 +0100
commit468254b38f8afd8d878ccce44b604bb6ce246dd4 (patch)
treee79249ea90fe0427f431ea9d15fcde617b971391
parent69d18a398656f41ff713b26cc8a0149635a8eea2 (diff)
downloadrust-468254b38f8afd8d878ccce44b604bb6ce246dd4.tar.gz
rust-468254b38f8afd8d878ccce44b604bb6ce246dd4.zip
Update tests
-rw-r--r--src/test/ui/cycle-trait/cycle-trait-default-type-trait.stderr5
-rw-r--r--src/test/ui/cycle-trait/cycle-trait-supertrait-direct.stderr5
-rw-r--r--src/test/ui/existential_types/no_inferrable_concrete_type.stderr11
-rw-r--r--src/test/ui/impl-trait/auto-trait-leak.stderr22
-rw-r--r--src/test/ui/infinite/infinite-vec-type-recursion.stderr8
-rw-r--r--src/test/ui/issues/issue-12511.stderr5
-rw-r--r--src/test/ui/issues/issue-20772.stderr8
-rw-r--r--src/test/ui/issues/issue-20825.stderr5
-rw-r--r--src/test/ui/issues/issue-22673.stderr5
-rw-r--r--src/test/ui/issues/issue-34373.stderr11
-rw-r--r--src/test/ui/resolve/issue-23305.stderr5
-rw-r--r--src/test/ui/resolve/resolve-self-in-impl.stderr55
-rw-r--r--src/test/ui/simd-intrinsic/simd-intrinsic-declaration-type.stderr72
13 files changed, 181 insertions, 36 deletions
diff --git a/src/test/ui/cycle-trait/cycle-trait-default-type-trait.stderr b/src/test/ui/cycle-trait/cycle-trait-default-type-trait.stderr
index 1a75eb5e314..aa45462a52e 100644
--- a/src/test/ui/cycle-trait/cycle-trait-default-type-trait.stderr
+++ b/src/test/ui/cycle-trait/cycle-trait-default-type-trait.stderr
@@ -5,6 +5,11 @@ LL | trait Foo<X = Box<Foo>> {
    |                   ^^^
    |
    = note: ...which again requires processing `Foo::X`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/cycle-trait-default-type-trait.rs:4:1
+   |
+LL | trait Foo<X = Box<Foo>> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/cycle-trait/cycle-trait-supertrait-direct.stderr b/src/test/ui/cycle-trait/cycle-trait-supertrait-direct.stderr
index 22efa8ee0a5..8aa3ac8abf5 100644
--- a/src/test/ui/cycle-trait/cycle-trait-supertrait-direct.stderr
+++ b/src/test/ui/cycle-trait/cycle-trait-supertrait-direct.stderr
@@ -5,6 +5,11 @@ LL | trait Chromosome: Chromosome {
    |                   ^^^^^^^^^^
    |
    = note: ...which again requires computing the supertraits of `Chromosome`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/cycle-trait-supertrait-direct.rs:3:1
+   |
+LL | trait Chromosome: Chromosome {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/existential_types/no_inferrable_concrete_type.stderr b/src/test/ui/existential_types/no_inferrable_concrete_type.stderr
index 9d2609e546d..fab61bd9ed0 100644
--- a/src/test/ui/existential_types/no_inferrable_concrete_type.stderr
+++ b/src/test/ui/existential_types/no_inferrable_concrete_type.stderr
@@ -10,6 +10,17 @@ note: ...which requires processing `bar`...
 LL | fn bar(x: Foo) -> Foo { x }
    |                       ^^^^^
    = note: ...which again requires processing `Foo`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/no_inferrable_concrete_type.rs:4:1
+   |
+LL | / #![feature(existential_type)]
+LL | |
+LL | | existential type Foo: Copy; //~ cycle detected
+LL | |
+...  |
+LL | |     let _: Foo = std::mem::transmute(0u8);
+LL | | }
+   | |_^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/impl-trait/auto-trait-leak.stderr b/src/test/ui/impl-trait/auto-trait-leak.stderr
index d6928584b9e..4acc400f8e7 100644
--- a/src/test/ui/impl-trait/auto-trait-leak.stderr
+++ b/src/test/ui/impl-trait/auto-trait-leak.stderr
@@ -22,6 +22,17 @@ LL | fn cycle2() -> impl Clone {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
    = note: ...which again requires processing `cycle1::{{impl-Trait}}`, completing the cycle
+note: cycle used when checking item types in top-level module
+  --> $DIR/auto-trait-leak.rs:3:1
+   |
+LL | / use std::cell::Cell;
+LL | | use std::rc::Rc;
+LL | |
+LL | | fn send<T: Send>(_: T) {}
+...  |
+LL | |     Rc::new(String::from("foo"))
+LL | | }
+   | |_^
 
 error[E0391]: cycle detected when processing `cycle1::{{impl-Trait}}`
   --> $DIR/auto-trait-leak.rs:14:16
@@ -46,6 +57,17 @@ note: ...which requires processing `cycle2`...
 LL | fn cycle2() -> impl Clone {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: ...which again requires processing `cycle1::{{impl-Trait}}`, completing the cycle
+note: cycle used when checking item types in top-level module
+  --> $DIR/auto-trait-leak.rs:3:1
+   |
+LL | / use std::cell::Cell;
+LL | | use std::rc::Rc;
+LL | |
+LL | | fn send<T: Send>(_: T) {}
+...  |
+LL | |     Rc::new(String::from("foo"))
+LL | | }
+   | |_^
 
 error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely
   --> $DIR/auto-trait-leak.rs:17:5
diff --git a/src/test/ui/infinite/infinite-vec-type-recursion.stderr b/src/test/ui/infinite/infinite-vec-type-recursion.stderr
index eb1461a7b29..daa18a7e9b1 100644
--- a/src/test/ui/infinite/infinite-vec-type-recursion.stderr
+++ b/src/test/ui/infinite/infinite-vec-type-recursion.stderr
@@ -5,6 +5,14 @@ LL | type X = Vec<X>;
    |              ^
    |
    = note: ...which again requires processing `X`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/infinite-vec-type-recursion.rs:1:1
+   |
+LL | / type X = Vec<X>;
+LL | | //~^ ERROR cycle detected
+LL | |
+LL | | fn main() { let b: X = Vec::new(); }
+   | |____________________________________^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-12511.stderr b/src/test/ui/issues/issue-12511.stderr
index 945cdc745ef..37e38ff60ae 100644
--- a/src/test/ui/issues/issue-12511.stderr
+++ b/src/test/ui/issues/issue-12511.stderr
@@ -10,6 +10,11 @@ note: ...which requires computing the supertraits of `T2`...
 LL | trait T2 : T1 {
    |            ^^
    = note: ...which again requires computing the supertraits of `T1`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/issue-12511.rs:1:1
+   |
+LL | trait T1 : T2 {
+   | ^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-20772.stderr b/src/test/ui/issues/issue-20772.stderr
index 15a5fc40926..7dc4e43fd57 100644
--- a/src/test/ui/issues/issue-20772.stderr
+++ b/src/test/ui/issues/issue-20772.stderr
@@ -8,6 +8,14 @@ LL | | {}
    | |__^
    |
    = note: ...which again requires computing the supertraits of `T`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/issue-20772.rs:1:1
+   |
+LL | / trait T : Iterator<Item=Self::Item>
+LL | | //~^ ERROR cycle detected
+LL | | //~| ERROR associated type `Item` not found for `Self`
+LL | | {}
+   | |__^
 
 error[E0220]: associated type `Item` not found for `Self`
   --> $DIR/issue-20772.rs:1:25
diff --git a/src/test/ui/issues/issue-20825.stderr b/src/test/ui/issues/issue-20825.stderr
index 1df51dc2d41..5f9709d1c64 100644
--- a/src/test/ui/issues/issue-20825.stderr
+++ b/src/test/ui/issues/issue-20825.stderr
@@ -5,6 +5,11 @@ LL | pub trait Processor: Subscriber<Input = Self::Input> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: ...which again requires computing the supertraits of `Processor`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/issue-20825.rs:5:1
+   |
+LL | pub trait Processor: Subscriber<Input = Self::Input> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-22673.stderr b/src/test/ui/issues/issue-22673.stderr
index 4b5730c91eb..9e7e4b218b1 100644
--- a/src/test/ui/issues/issue-22673.stderr
+++ b/src/test/ui/issues/issue-22673.stderr
@@ -5,6 +5,11 @@ LL | trait Expr : PartialEq<Self::Item> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: ...which again requires computing the supertraits of `Expr`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/issue-22673.rs:1:1
+   |
+LL | trait Expr : PartialEq<Self::Item> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-34373.stderr b/src/test/ui/issues/issue-34373.stderr
index 45e8d1bf3e3..07ac421455c 100644
--- a/src/test/ui/issues/issue-34373.stderr
+++ b/src/test/ui/issues/issue-34373.stderr
@@ -10,6 +10,17 @@ note: ...which requires processing `DefaultFoo`...
 LL | type DefaultFoo = Foo;
    |                   ^^^
    = note: ...which again requires processing `Foo::T`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/issue-34373.rs:1:1
+   |
+LL | / #![allow(warnings)]
+LL | |
+LL | | trait Trait<T> {
+LL | |     fn foo(_: T) {}
+...  |
+LL | | fn main() {
+LL | | }
+   | |_^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/resolve/issue-23305.stderr b/src/test/ui/resolve/issue-23305.stderr
index 17b2f9fa4fb..1da56ad05d2 100644
--- a/src/test/ui/resolve/issue-23305.stderr
+++ b/src/test/ui/resolve/issue-23305.stderr
@@ -5,6 +5,11 @@ LL | impl ToNbt<Self> {}
    |            ^^^^
    |
    = note: ...which again requires processing `<impl at $DIR/issue-23305.rs:5:1: 5:20>`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/issue-23305.rs:1:1
+   |
+LL | pub trait ToNbt<T> {
+   | ^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/resolve/resolve-self-in-impl.stderr b/src/test/ui/resolve/resolve-self-in-impl.stderr
index 47704f114d1..1940c0cd2a4 100644
--- a/src/test/ui/resolve/resolve-self-in-impl.stderr
+++ b/src/test/ui/resolve/resolve-self-in-impl.stderr
@@ -5,6 +5,17 @@ LL | impl Tr for Self {} //~ ERROR cycle detected
    |             ^^^^
    |
    = note: ...which again requires processing `<impl at $DIR/resolve-self-in-impl.rs:14:1: 14:20>`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/resolve-self-in-impl.rs:1:1
+   |
+LL | / #![feature(associated_type_defaults)]
+LL | |
+LL | | struct S<T = u8>(T);
+LL | | trait Tr<T = u8> {
+...  |
+LL | |
+LL | | fn main() {}
+   | |____________^
 
 error[E0391]: cycle detected when processing `<impl at $DIR/resolve-self-in-impl.rs:15:1: 15:23>`
   --> $DIR/resolve-self-in-impl.rs:15:15
@@ -13,6 +24,17 @@ LL | impl Tr for S<Self> {} //~ ERROR cycle detected
    |               ^^^^
    |
    = note: ...which again requires processing `<impl at $DIR/resolve-self-in-impl.rs:15:1: 15:23>`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/resolve-self-in-impl.rs:1:1
+   |
+LL | / #![feature(associated_type_defaults)]
+LL | |
+LL | | struct S<T = u8>(T);
+LL | | trait Tr<T = u8> {
+...  |
+LL | |
+LL | | fn main() {}
+   | |____________^
 
 error[E0391]: cycle detected when processing `<impl at $DIR/resolve-self-in-impl.rs:16:1: 16:13>`
   --> $DIR/resolve-self-in-impl.rs:16:6
@@ -21,6 +43,17 @@ LL | impl Self {} //~ ERROR cycle detected
    |      ^^^^
    |
    = note: ...which again requires processing `<impl at $DIR/resolve-self-in-impl.rs:16:1: 16:13>`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/resolve-self-in-impl.rs:1:1
+   |
+LL | / #![feature(associated_type_defaults)]
+LL | |
+LL | | struct S<T = u8>(T);
+LL | | trait Tr<T = u8> {
+...  |
+LL | |
+LL | | fn main() {}
+   | |____________^
 
 error[E0391]: cycle detected when processing `<impl at $DIR/resolve-self-in-impl.rs:17:1: 17:16>`
   --> $DIR/resolve-self-in-impl.rs:17:8
@@ -29,6 +62,17 @@ LL | impl S<Self> {} //~ ERROR cycle detected
    |        ^^^^
    |
    = note: ...which again requires processing `<impl at $DIR/resolve-self-in-impl.rs:17:1: 17:16>`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/resolve-self-in-impl.rs:1:1
+   |
+LL | / #![feature(associated_type_defaults)]
+LL | |
+LL | | struct S<T = u8>(T);
+LL | | trait Tr<T = u8> {
+...  |
+LL | |
+LL | | fn main() {}
+   | |____________^
 
 error[E0391]: cycle detected when processing `<impl at $DIR/resolve-self-in-impl.rs:18:1: 18:26>`
   --> $DIR/resolve-self-in-impl.rs:18:1
@@ -37,6 +81,17 @@ LL | impl Tr<Self::A> for S {} //~ ERROR cycle detected
    | ^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: ...which again requires processing `<impl at $DIR/resolve-self-in-impl.rs:18:1: 18:26>`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/resolve-self-in-impl.rs:1:1
+   |
+LL | / #![feature(associated_type_defaults)]
+LL | |
+LL | | struct S<T = u8>(T);
+LL | | trait Tr<T = u8> {
+...  |
+LL | |
+LL | | fn main() {}
+   | |____________^
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/simd-intrinsic/simd-intrinsic-declaration-type.stderr b/src/test/ui/simd-intrinsic/simd-intrinsic-declaration-type.stderr
index 4c1985b9f3a..22df5e42d26 100644
--- a/src/test/ui/simd-intrinsic/simd-intrinsic-declaration-type.stderr
+++ b/src/test/ui/simd-intrinsic/simd-intrinsic-declaration-type.stderr
@@ -1,39 +1,3 @@
-error[E0442]: intrinsic argument 1 has wrong type: found `u16`, expected `i16`
-  --> $DIR/simd-intrinsic-declaration-type.rs:33:9
-   |
-LL |         fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0442]: intrinsic argument 2 has wrong type: found `u16`, expected `i16`
-  --> $DIR/simd-intrinsic-declaration-type.rs:33:9
-   |
-LL |         fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0442]: intrinsic return value has wrong type: found `u16`, expected `i16`
-  --> $DIR/simd-intrinsic-declaration-type.rs:33:9
-   |
-LL |         fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0442]: intrinsic argument 1 has wrong type: found `i16`, expected `u16`
-  --> $DIR/simd-intrinsic-declaration-type.rs:37:9
-   |
-LL |         fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0442]: intrinsic argument 2 has wrong type: found `i16`, expected `u16`
-  --> $DIR/simd-intrinsic-declaration-type.rs:37:9
-   |
-LL |         fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0442]: intrinsic return value has wrong type: found `i16`, expected `u16`
-  --> $DIR/simd-intrinsic-declaration-type.rs:37:9
-   |
-LL |         fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
 error[E0442]: intrinsic argument 1 has wrong type: found vector with length 16, expected length 8
   --> $DIR/simd-intrinsic-declaration-type.rs:45:5
    |
@@ -70,6 +34,42 @@ error[E0442]: intrinsic return value has wrong type: found `i32`, expected `f32`
 LL |     fn x86_mm_max_ps(x: i32x4, y: i32x4) -> i32x4;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+error[E0442]: intrinsic argument 1 has wrong type: found `u16`, expected `i16`
+  --> $DIR/simd-intrinsic-declaration-type.rs:33:9
+   |
+LL |         fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0442]: intrinsic argument 2 has wrong type: found `u16`, expected `i16`
+  --> $DIR/simd-intrinsic-declaration-type.rs:33:9
+   |
+LL |         fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0442]: intrinsic return value has wrong type: found `u16`, expected `i16`
+  --> $DIR/simd-intrinsic-declaration-type.rs:33:9
+   |
+LL |         fn x86_mm_adds_epi16(x: u16x8, y: u16x8) -> u16x8;
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0442]: intrinsic argument 1 has wrong type: found `i16`, expected `u16`
+  --> $DIR/simd-intrinsic-declaration-type.rs:37:9
+   |
+LL |         fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0442]: intrinsic argument 2 has wrong type: found `i16`, expected `u16`
+  --> $DIR/simd-intrinsic-declaration-type.rs:37:9
+   |
+LL |         fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0442]: intrinsic return value has wrong type: found `i16`, expected `u16`
+  --> $DIR/simd-intrinsic-declaration-type.rs:37:9
+   |
+LL |         fn x86_mm_adds_epu16(x: i16x8, y: i16x8) -> i16x8;
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
 error: aborting due to 12 previous errors
 
 For more information about this error, try `rustc --explain E0442`.