Skip to content

Commit

Permalink
update ui test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
tlyu committed Jun 5, 2021
1 parent 5864487 commit 6676902
Show file tree
Hide file tree
Showing 17 changed files with 64 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | x: Error
::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
LL | fn hash<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
| ------ required by this bound in `std::hash::Hash::hash`
|
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/derives/derives-span-Hash-enum.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | Error
::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
LL | fn hash<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
| ------ required by this bound in `std::hash::Hash::hash`
|
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/derives/derives-span-Hash-struct.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | x: Error
::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
LL | fn hash<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
| ------ required by this bound in `std::hash::Hash::hash`
|
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/derives/derives-span-Hash-tuple-struct.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | Error
::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
LL | fn hash<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
| ------ required by this bound in `std::hash::Hash::hash`
|
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)

Expand Down
28 changes: 14 additions & 14 deletions src/test/ui/generic-associated-types/issue-74816.stderr
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
error[E0277]: the trait bound `Self: Trait1` is not satisfied
--> $DIR/issue-74816.rs:10:5
|
LL | type Associated: Trait1 = Self;
| ^^^^^^^^^^^^^^^^^------^^^^^^^^
| | |
| | required by this bound in `Trait2::Associated`
| the trait `Trait1` is not implemented for `Self`
|
help: consider further restricting `Self`
|
LL | trait Trait2: Trait1 {
| ^^^^^^^^

error[E0277]: the size for values of type `Self` cannot be known at compilation time
--> $DIR/issue-74816.rs:10:5
|
Expand All @@ -26,6 +12,20 @@ help: consider further restricting `Self`
LL | trait Trait2: Sized {
| ^^^^^^^

error[E0277]: the trait bound `Self: Trait1` is not satisfied
--> $DIR/issue-74816.rs:10:5
|
LL | type Associated: Trait1 = Self;
| ^^^^^^^^^^^^^^^^^------^^^^^^^^
| | |
| | required by this bound in `Trait2::Associated`
| the trait `Trait1` is not implemented for `Self`
|
help: consider further restricting `Self`
|
LL | trait Trait2: Trait1 {
| ^^^^^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the size for values of type `[()]` cannot be known at compilation
--> $DIR/issue-61631-default-type-param-can-reference-self-in-trait.rs:19:6
|
LL | trait Tsized<P: Sized = [Self]> {}
| - required by this bound in `Tsized`
| ----- required by this bound in `Tsized`
LL |
LL | impl Tsized for () {}
| ^^^^^^ doesn't have a size known at compile-time
Expand Down
14 changes: 12 additions & 2 deletions src/test/ui/issues/issue-16966.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
error[E0282]: type annotations needed
error[E0283]: type annotations needed
--> $DIR/issue-16966.rs:2:5
|
LL | panic!(std::default::Default::default());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `M` declared on the function `begin_panic`
|
::: $SRC_DIR/std/src/panicking.rs:LL:COL
|
LL | pub fn begin_panic<M: Any + Send>(msg: M) -> ! {
| --- required by this bound in `begin_panic`
|
= note: cannot satisfy `_: Any`
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider specifying the type argument in the function call
|
LL | $crate::rt::begin_panic::<M>($msg)
| ^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0282`.
For more information about this error, try `rustc --explain E0283`.
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-21160.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | struct Foo(Bar);
::: $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
LL | fn hash<H: Hasher>(&self, state: &mut H);
| - required by this bound in `std::hash::Hash::hash`
| ------ required by this bound in `std::hash::Hash::hash`
|
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-23122-2.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized`
error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Next`
--> $DIR/issue-23122-2.rs:9:5
|
LL | type Next = <GetNext<T::Next> as Next>::Next;
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-54954.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
...
LL | const fn const_val<T: Sized>() -> usize {
| - required by this bound in `Tt::const_val`
| ----- required by this bound in `Tt::const_val`
|
= note: cannot satisfy `_: Tt`

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/suggestions/issue-84973-blacklist.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ error[E0277]: the size for values of type `dyn Fn()` cannot be known at compilat
--> $DIR/issue-84973-blacklist.rs:22:13
|
LL | fn f_sized<T: Sized>(t: T) {}
| - required by this bound in `f_sized`
| ----- required by this bound in `f_sized`
...
LL | f_sized(*ref_cl);
| ^^^^^^^ doesn't have a size known at compile-time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ note: previous use here
LL | fn two<T: Debug + Foo, U: Debug>(t: T, u: U) -> Two<T, U> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, <A as Foo>::Bar)`
--> $DIR/generic_duplicate_param_use9.rs:10:18
|
LL | type Two<A, B> = impl Debug;
| ^^^^^^^^^^ within `(A, B, <A as Foo>::Bar)`, the trait `Foo` is not implemented for `A`
|
= note: required because it appears within the type `(A, B, <A as Foo>::Bar)`
help: consider restricting type parameter `A`
|
LL | type Two<A: Foo, B> = impl Debug;
| ^^^^^

error[E0277]: `A` doesn't implement `Debug`
--> $DIR/generic_duplicate_param_use9.rs:10:18
|
Expand All @@ -55,6 +43,18 @@ help: consider restricting type parameter `B`
LL | type Two<A, B: std::fmt::Debug> = impl Debug;
| ^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `A: Foo` is not satisfied
--> $DIR/generic_duplicate_param_use9.rs:10:18
|
LL | type Two<A, B> = impl Debug;
| ^^^^^^^^^^ the trait `Foo` is not implemented for `A`
|
= note: required because of the requirements on the impl of `Debug` for `(A, B, <A as Foo>::Bar)`
help: consider restricting type parameter `A`
|
LL | type Two<A: Foo, B> = impl Debug;
| ^^^^^

error: aborting due to 4 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0277`.
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ note: previous use here
LL | fn two<T: Debug + Foo, U: Debug>(t: T, u: U) -> Two<T, U> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, <A as Foo>::Bar)`
--> $DIR/generic_duplicate_param_use9.rs:10:18
|
LL | type Two<A, B> = impl Debug;
| ^^^^^^^^^^ within `(A, B, <A as Foo>::Bar)`, the trait `Foo` is not implemented for `A`
|
= note: required because it appears within the type `(A, B, <A as Foo>::Bar)`
help: consider restricting type parameter `A`
|
LL | type Two<A: Foo, B> = impl Debug;
| ^^^^^

error[E0277]: `A` doesn't implement `Debug`
--> $DIR/generic_duplicate_param_use9.rs:10:18
|
Expand All @@ -46,6 +34,18 @@ help: consider restricting type parameter `B`
LL | type Two<A, B: std::fmt::Debug> = impl Debug;
| ^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `A: Foo` is not satisfied
--> $DIR/generic_duplicate_param_use9.rs:10:18
|
LL | type Two<A, B> = impl Debug;
| ^^^^^^^^^^ the trait `Foo` is not implemented for `A`
|
= note: required because of the requirements on the impl of `Debug` for `(A, B, <A as Foo>::Bar)`
help: consider restricting type parameter `A`
|
LL | type Two<A: Foo, B> = impl Debug;
| ^^^^^

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0277`.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::fmt::Debug;
fn main() {}

type Two<A, B> = impl Debug;
//~^ ERROR the trait bound `A: Foo` is not satisfied in `(A, B, <A as Foo>::Bar)`
//~^ ERROR the trait bound `A: Foo` is not satisfied
//~| ERROR `A` doesn't implement `Debug`
//~| ERROR `B` doesn't implement `Debug`

Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/unique-object-noncopyable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ LL | | >(Unique<T>, A);
| |________________- doesn't satisfy `Box<dyn Foo>: Clone`
|
= note: the following trait bounds were not satisfied:
`dyn Foo: Sized`
which is required by `Box<dyn Foo>: Clone`
`dyn Foo: Clone`
which is required by `Box<dyn Foo>: Clone`
`dyn Foo: Sized`
which is required by `Box<dyn Foo>: Clone`

error: aborting due to previous error

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/unsized/unsized-bare-typaram.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim
--> $DIR/unsized-bare-typaram.rs:2:29
|
LL | fn bar<T: Sized>() { }
| - required by this bound in `bar`
| ----- required by this bound in `bar`
LL | fn foo<T: ?Sized>() { bar::<T>() }
| - ^ doesn't have a size known at compile-time
| |
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/unsized/unsized-struct.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ error[E0277]: the size for values of type `T` cannot be known at compilation tim
--> $DIR/unsized-struct.rs:13:24
|
LL | fn is_sized<T:Sized>() { }
| - required by this bound in `is_sized`
| ----- required by this bound in `is_sized`
...
LL | fn bar2<T: ?Sized>() { is_sized::<Bar<T>>() }
| - ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
Expand Down

0 comments on commit 6676902

Please sign in to comment.