diff options
Diffstat (limited to 'tests/ui/on-unimplemented')
-rw-r--r-- | tests/ui/on-unimplemented/expected-comma-found-token.stderr | 2 | ||||
-rw-r--r-- | tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr | 2 | ||||
-rw-r--r-- | tests/ui/on-unimplemented/impl-substs.stderr | 5 | ||||
-rw-r--r-- | tests/ui/on-unimplemented/issue-104140.stderr | 2 | ||||
-rw-r--r-- | tests/ui/on-unimplemented/multiple-impls.stderr | 18 | ||||
-rw-r--r-- | tests/ui/on-unimplemented/on-impl.stderr | 3 | ||||
-rw-r--r-- | tests/ui/on-unimplemented/on-trait.stderr | 10 | ||||
-rw-r--r-- | tests/ui/on-unimplemented/parent-label.stderr | 20 | ||||
-rw-r--r-- | tests/ui/on-unimplemented/slice-index.stderr | 5 | ||||
-rw-r--r-- | tests/ui/on-unimplemented/sum.stderr | 16 |
10 files changed, 61 insertions, 22 deletions
diff --git a/tests/ui/on-unimplemented/expected-comma-found-token.stderr b/tests/ui/on-unimplemented/expected-comma-found-token.stderr index 048b72ee3..7c0874e36 100644 --- a/tests/ui/on-unimplemented/expected-comma-found-token.stderr +++ b/tests/ui/on-unimplemented/expected-comma-found-token.stderr @@ -6,5 +6,5 @@ LL | message="the message" LL | label="the label" | ^^^^^ unexpected token -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr b/tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr index a4b33963f..45ef22f44 100644 --- a/tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr +++ b/tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr @@ -6,6 +6,6 @@ LL | #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"] | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/on-unimplemented/impl-substs.stderr b/tests/ui/on-unimplemented/impl-substs.stderr index a0fad0acd..e2ba2474d 100644 --- a/tests/ui/on-unimplemented/impl-substs.stderr +++ b/tests/ui/on-unimplemented/impl-substs.stderr @@ -7,8 +7,9 @@ LL | Foo::<usize>::foo((1i32, 1i32, 1i32)); | required by a bound introduced by this call | = help: the trait `Foo<usize>` is not implemented for `(i32, i32, i32)` - = help: the trait `Foo<A>` is implemented for `(A, B, C)` + = help: the trait `Foo<i32>` is implemented for `(i32, i32, i32)` + = help: for that trait implementation, expected `i32`, found `usize` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/on-unimplemented/issue-104140.stderr b/tests/ui/on-unimplemented/issue-104140.stderr index ddb1f50f0..4ba5475d9 100644 --- a/tests/ui/on-unimplemented/issue-104140.stderr +++ b/tests/ui/on-unimplemented/issue-104140.stderr @@ -11,5 +11,5 @@ LL | #[rustc_on_unimplemented = "message"] LL | #[rustc_on_unimplemented(/*opt*/ message = "...", /*opt*/ label = "...", /*opt*/ note = "...")] | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/on-unimplemented/multiple-impls.stderr b/tests/ui/on-unimplemented/multiple-impls.stderr index d628b159a..3d0e36db7 100644 --- a/tests/ui/on-unimplemented/multiple-impls.stderr +++ b/tests/ui/on-unimplemented/multiple-impls.stderr @@ -8,8 +8,8 @@ LL | Index::index(&[] as &[i32], 2u32); | = help: the trait `Index<u32>` is not implemented for `[i32]` = help: the following other types implement trait `Index<Idx>`: - <[i32] as Index<Bar<usize>>> <[i32] as Index<Foo<usize>>> + <[i32] as Index<Bar<usize>>> error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied --> $DIR/multiple-impls.rs:33:5 @@ -19,8 +19,8 @@ LL | Index::index(&[] as &[i32], 2u32); | = help: the trait `Index<u32>` is not implemented for `[i32]` = help: the following other types implement trait `Index<Idx>`: - <[i32] as Index<Bar<usize>>> <[i32] as Index<Foo<usize>>> + <[i32] as Index<Bar<usize>>> error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied --> $DIR/multiple-impls.rs:37:33 @@ -32,8 +32,8 @@ LL | Index::index(&[] as &[i32], Foo(2u32)); | = help: the trait `Index<Foo<u32>>` is not implemented for `[i32]` = help: the following other types implement trait `Index<Idx>`: - <[i32] as Index<Bar<usize>>> <[i32] as Index<Foo<usize>>> + <[i32] as Index<Bar<usize>>> error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied --> $DIR/multiple-impls.rs:37:5 @@ -43,8 +43,8 @@ LL | Index::index(&[] as &[i32], Foo(2u32)); | = help: the trait `Index<Foo<u32>>` is not implemented for `[i32]` = help: the following other types implement trait `Index<Idx>`: - <[i32] as Index<Bar<usize>>> <[i32] as Index<Foo<usize>>> + <[i32] as Index<Bar<usize>>> error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied --> $DIR/multiple-impls.rs:41:33 @@ -56,8 +56,8 @@ LL | Index::index(&[] as &[i32], Bar(2u32)); | = help: the trait `Index<Bar<u32>>` is not implemented for `[i32]` = help: the following other types implement trait `Index<Idx>`: - <[i32] as Index<Bar<usize>>> <[i32] as Index<Foo<usize>>> + <[i32] as Index<Bar<usize>>> error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied --> $DIR/multiple-impls.rs:41:5 @@ -67,8 +67,8 @@ LL | Index::index(&[] as &[i32], Bar(2u32)); | = help: the trait `Index<Bar<u32>>` is not implemented for `[i32]` = help: the following other types implement trait `Index<Idx>`: - <[i32] as Index<Bar<usize>>> <[i32] as Index<Foo<usize>>> + <[i32] as Index<Bar<usize>>> error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied --> $DIR/multiple-impls.rs:33:5 @@ -78,8 +78,8 @@ LL | Index::index(&[] as &[i32], 2u32); | = help: the trait `Index<u32>` is not implemented for `[i32]` = help: the following other types implement trait `Index<Idx>`: - <[i32] as Index<Bar<usize>>> <[i32] as Index<Foo<usize>>> + <[i32] as Index<Bar<usize>>> error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied --> $DIR/multiple-impls.rs:37:5 @@ -89,8 +89,8 @@ LL | Index::index(&[] as &[i32], Foo(2u32)); | = help: the trait `Index<Foo<u32>>` is not implemented for `[i32]` = help: the following other types implement trait `Index<Idx>`: - <[i32] as Index<Bar<usize>>> <[i32] as Index<Foo<usize>>> + <[i32] as Index<Bar<usize>>> error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied --> $DIR/multiple-impls.rs:41:5 @@ -100,8 +100,8 @@ LL | Index::index(&[] as &[i32], Bar(2u32)); | = help: the trait `Index<Bar<u32>>` is not implemented for `[i32]` = help: the following other types implement trait `Index<Idx>`: - <[i32] as Index<Bar<usize>>> <[i32] as Index<Foo<usize>>> + <[i32] as Index<Bar<usize>>> error: aborting due to 9 previous errors diff --git a/tests/ui/on-unimplemented/on-impl.stderr b/tests/ui/on-unimplemented/on-impl.stderr index 2253c5992..3a0b8353f 100644 --- a/tests/ui/on-unimplemented/on-impl.stderr +++ b/tests/ui/on-unimplemented/on-impl.stderr @@ -8,6 +8,7 @@ LL | Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32); | = help: the trait `Index<u32>` is not implemented for `[i32]` = help: the trait `Index<usize>` is implemented for `[i32]` + = help: for that trait implementation, expected `usize`, found `u32` error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied --> $DIR/on-impl.rs:22:5 @@ -17,6 +18,7 @@ LL | Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32); | = help: the trait `Index<u32>` is not implemented for `[i32]` = help: the trait `Index<usize>` is implemented for `[i32]` + = help: for that trait implementation, expected `usize`, found `u32` error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied --> $DIR/on-impl.rs:22:5 @@ -26,6 +28,7 @@ LL | Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32); | = help: the trait `Index<u32>` is not implemented for `[i32]` = help: the trait `Index<usize>` is implemented for `[i32]` + = help: for that trait implementation, expected `usize`, found `u32` error: aborting due to 3 previous errors diff --git a/tests/ui/on-unimplemented/on-trait.stderr b/tests/ui/on-unimplemented/on-trait.stderr index 4b040f1ac..4847a1a5a 100644 --- a/tests/ui/on-unimplemented/on-trait.stderr +++ b/tests/ui/on-unimplemented/on-trait.stderr @@ -5,6 +5,11 @@ LL | let y: Option<Vec<u8>> = collect(x.iter()); // this should give approxi | ^^^^^^^ a collection of type `Option<Vec<u8>>` cannot be built from an iterator over elements of type `&u8` | = help: the trait `MyFromIterator<&u8>` is not implemented for `Option<Vec<u8>>` +help: this trait has no implementations, consider adding one + --> $DIR/on-trait.rs:17:1 + | +LL | trait MyFromIterator<A> { + | ^^^^^^^^^^^^^^^^^^^^^^^ note: required by a bound in `collect` --> $DIR/on-trait.rs:22:39 | @@ -18,6 +23,11 @@ LL | let x: String = foobar(); | ^^^^^^ test error `String` with `u8` `_` `u32` in `Foo` | = help: the trait `Foo<u8, _, u32>` is not implemented for `String` +help: this trait has no implementations, consider adding one + --> $DIR/on-trait.rs:7:3 + | +LL | pub trait Foo<Bar, Baz, Quux> {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: required by a bound in `foobar` --> $DIR/on-trait.rs:12:24 | diff --git a/tests/ui/on-unimplemented/parent-label.stderr b/tests/ui/on-unimplemented/parent-label.stderr index 8cd7412fd..101a41512 100644 --- a/tests/ui/on-unimplemented/parent-label.stderr +++ b/tests/ui/on-unimplemented/parent-label.stderr @@ -8,6 +8,11 @@ LL | f(Foo {}); | | | required by a bound introduced by this call | +help: this trait has no implementations, consider adding one + --> $DIR/parent-label.rs:6:1 + | +LL | trait Trait {} + | ^^^^^^^^^^^ note: required by a bound in `f` --> $DIR/parent-label.rs:10:9 | @@ -24,6 +29,11 @@ LL | f(Foo {}); | | | required by a bound introduced by this call | +help: this trait has no implementations, consider adding one + --> $DIR/parent-label.rs:6:1 + | +LL | trait Trait {} + | ^^^^^^^^^^^ note: required by a bound in `f` --> $DIR/parent-label.rs:10:9 | @@ -41,6 +51,11 @@ LL | f(Foo {}); | | | required by a bound introduced by this call | +help: this trait has no implementations, consider adding one + --> $DIR/parent-label.rs:6:1 + | +LL | trait Trait {} + | ^^^^^^^^^^^ note: required by a bound in `f` --> $DIR/parent-label.rs:10:9 | @@ -58,6 +73,11 @@ LL | f(Foo {}); | | | required by a bound introduced by this call | +help: this trait has no implementations, consider adding one + --> $DIR/parent-label.rs:6:1 + | +LL | trait Trait {} + | ^^^^^^^^^^^ note: required by a bound in `f` --> $DIR/parent-label.rs:10:9 | diff --git a/tests/ui/on-unimplemented/slice-index.stderr b/tests/ui/on-unimplemented/slice-index.stderr index a7ec3bda8..5e0117be5 100644 --- a/tests/ui/on-unimplemented/slice-index.stderr +++ b/tests/ui/on-unimplemented/slice-index.stderr @@ -5,7 +5,8 @@ LL | x[1i32]; | ^^^^ slice indices are of type `usize` or ranges of `usize` | = help: the trait `SliceIndex<[i32]>` is not implemented for `i32` - = help: the trait `SliceIndex<[T]>` is implemented for `usize` + = help: the trait `SliceIndex<[i32]>` is implemented for `usize` + = help: for that trait implementation, expected `usize`, found `i32` = note: required for `[i32]` to implement `Index<i32>` error[E0277]: the type `[i32]` cannot be indexed by `RangeTo<i32>` @@ -16,8 +17,8 @@ LL | x[..1i32]; | = help: the trait `SliceIndex<[i32]>` is not implemented for `RangeTo<i32>` = help: the following other types implement trait `SliceIndex<T>`: - <RangeTo<usize> as SliceIndex<[T]>> <RangeTo<usize> as SliceIndex<str>> + <RangeTo<usize> as SliceIndex<[T]>> = note: required for `[i32]` to implement `Index<RangeTo<i32>>` error: aborting due to 2 previous errors diff --git a/tests/ui/on-unimplemented/sum.stderr b/tests/ui/on-unimplemented/sum.stderr index 2a316dba7..257dec200 100644 --- a/tests/ui/on-unimplemented/sum.stderr +++ b/tests/ui/on-unimplemented/sum.stderr @@ -1,13 +1,15 @@ error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `&()` - --> $DIR/sum.rs:4:25 + --> $DIR/sum.rs:4:31 | LL | vec![(), ()].iter().sum::<i32>(); - | ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=&()>` + | --- ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=&()>` + | | + | required by a bound introduced by this call | = help: the trait `Sum<&()>` is not implemented for `i32` = help: the following other types implement trait `Sum<A>`: - <i32 as Sum<&'a i32>> <i32 as Sum> + <i32 as Sum<&'a i32>> note: the method call chain might not have had the expected associated types --> $DIR/sum.rs:4:18 | @@ -19,15 +21,17 @@ note: required by a bound in `std::iter::Iterator::sum` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL error[E0277]: a value of type `i32` cannot be made by multiplying all elements of type `&()` from an iterator - --> $DIR/sum.rs:7:25 + --> $DIR/sum.rs:7:35 | LL | vec![(), ()].iter().product::<i32>(); - | ^^^^^^^ value of type `i32` cannot be made by multiplying all elements from a `std::iter::Iterator<Item=&()>` + | ------- ^^^ value of type `i32` cannot be made by multiplying all elements from a `std::iter::Iterator<Item=&()>` + | | + | required by a bound introduced by this call | = help: the trait `Product<&()>` is not implemented for `i32` = help: the following other types implement trait `Product<A>`: - <i32 as Product<&'a i32>> <i32 as Product> + <i32 as Product<&'a i32>> note: the method call chain might not have had the expected associated types --> $DIR/sum.rs:7:18 | |