From c96452074027479cec7d93cad8a8688577ec3cf1 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sun, 15 Sep 2019 16:52:02 +0200 Subject: [PATCH] Update tests after compiletest changes --- .../defaults-suitability.stderr | 93 ++++++------------- .../defaults-unsound-62211-1.stderr | 32 +++---- .../defaults-unsound-62211-2.stderr | 32 +++---- .../ui/associated-types/issue-43924.stderr | 8 +- src/test/ui/associated-types/issue-54182-1.rs | 4 +- src/test/ui/associated-types/issue-63593.rs | 2 + .../ui/associated-types/issue-63593.stderr | 16 +--- 7 files changed, 63 insertions(+), 124 deletions(-) diff --git a/src/test/ui/associated-types/defaults-suitability.stderr b/src/test/ui/associated-types/defaults-suitability.stderr index 9a7febeb62d..dd45c9e4436 100644 --- a/src/test/ui/associated-types/defaults-suitability.stderr +++ b/src/test/ui/associated-types/defaults-suitability.stderr @@ -1,154 +1,119 @@ error[E0277]: the trait bound `NotClone: std::clone::Clone` is not satisfied --> $DIR/defaults-suitability.rs:17:14 | +LL | trait Tr { + | -------- required by `Tr` LL | type Ty: Clone = NotClone; | ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone` - | -note: required by `Tr` - --> $DIR/defaults-suitability.rs:16:1 - | -LL | trait Tr { - | ^^^^^^^^ error[E0277]: the trait bound `NotClone: std::clone::Clone` is not satisfied --> $DIR/defaults-suitability.rs:22:27 | LL | trait Tr2 where Self::Ty: Clone { - | ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone` - | -note: required by `Tr2` - --> $DIR/defaults-suitability.rs:22:1 - | -LL | trait Tr2 where Self::Ty: Clone { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | --------------------------^^^^^ + | | | + | | the trait `std::clone::Clone` is not implemented for `NotClone` + | required by `Tr2` error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied --> $DIR/defaults-suitability.rs:35:15 | +LL | trait Foo { + | ------------ required by `Foo` LL | type Bar: Clone = Vec; | ^^^^^ the trait `std::clone::Clone` is not implemented for `T` | = help: consider adding a `where T: std::clone::Clone` bound = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec` -note: required by `Foo` - --> $DIR/defaults-suitability.rs:34:1 - | -LL | trait Foo { - | ^^^^^^^^^^^^ error[E0277]: the trait bound `(): Foo` is not satisfied --> $DIR/defaults-suitability.rs:41:17 | +LL | trait Bar: Sized { + | ---------------- required by `Bar` +LL | // `(): Foo` might hold for some possible impls but not all. LL | type Assoc: Foo = (); | ^^^^^^^^^ the trait `Foo` is not implemented for `()` - | -note: required by `Bar` - --> $DIR/defaults-suitability.rs:39:1 - | -LL | trait Bar: Sized { - | ^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `NotClone: IsU8` is not satisfied --> $DIR/defaults-suitability.rs:61:18 | -LL | Self::Assoc: IsU8, - | ^^^^^^^^^^^^^^^^^ the trait `IsU8` is not implemented for `NotClone` - | -note: required by `D` - --> $DIR/defaults-suitability.rs:58:1 - | LL | / trait D where LL | | Vec: Clone, LL | | LL | | Self::Assoc: IsU8, + | | ^^^^^^^^^^^^^^^^^ the trait `IsU8` is not implemented for `NotClone` ... | LL | | type Assoc = NotClone; LL | | } - | |_^ + | |_- required by `D` error[E0277]: the trait bound `bool: IsU8` is not satisfied --> $DIR/defaults-suitability.rs:63:11 | -LL | bool: IsU8, - | ^^^^^^^^^^^^^^^^^ the trait `IsU8` is not implemented for `bool` - | -note: required by `D` - --> $DIR/defaults-suitability.rs:58:1 - | LL | / trait D where LL | | Vec: Clone, LL | | LL | | Self::Assoc: IsU8, +LL | | +LL | | bool: IsU8, + | | ^^^^^^^^^^^^^^^^^ the trait `IsU8` is not implemented for `bool` ... | LL | | type Assoc = NotClone; LL | | } - | |_^ + | |_- required by `D` error[E0277]: the trait bound `NotClone: std::clone::Clone` is not satisfied --> $DIR/defaults-suitability.rs:59:23 | -LL | Vec: Clone, - | ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone` - | - = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec` -note: required by `D` - --> $DIR/defaults-suitability.rs:58:1 - | LL | / trait D where LL | | Vec: Clone, + | | ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone` LL | | LL | | Self::Assoc: IsU8, ... | LL | | type Assoc = NotClone; LL | | } - | |_^ + | |_- required by `D` + | + = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec` error[E0277]: the trait bound `>::Baz: std::clone::Clone` is not satisfied --> $DIR/defaults-suitability.rs:74:15 | +LL | trait Foo2 { + | ------------- required by `Foo2` LL | type Bar: Clone = Vec; | ^^^^^ the trait `std::clone::Clone` is not implemented for `>::Baz` | = help: consider adding a `where >::Baz: std::clone::Clone` bound = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<>::Baz>` -note: required by `Foo2` - --> $DIR/defaults-suitability.rs:73:1 - | -LL | trait Foo2 { - | ^^^^^^^^^^^^^ error[E0277]: the trait bound `>::Baz: std::clone::Clone` is not satisfied --> $DIR/defaults-suitability.rs:83:15 | +LL | trait Foo25 { + | --------------------- required by `Foo25` LL | type Bar: Clone = Vec; | ^^^^^ the trait `std::clone::Clone` is not implemented for `>::Baz` | = help: consider adding a `where >::Baz: std::clone::Clone` bound = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<>::Baz>` -note: required by `Foo25` - --> $DIR/defaults-suitability.rs:82:1 - | -LL | trait Foo25 { - | ^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied --> $DIR/defaults-suitability.rs:92:16 | -LL | Self::Baz: Clone, - | ^^^^^ the trait `std::clone::Clone` is not implemented for `T` - | - = help: consider adding a `where T: std::clone::Clone` bound -note: required by `Foo3` - --> $DIR/defaults-suitability.rs:90:1 - | LL | / trait Foo3 where LL | | Self::Bar: Clone, LL | | Self::Baz: Clone, + | | ^^^^^ the trait `std::clone::Clone` is not implemented for `T` LL | | ... | LL | | type Baz = T; LL | | } - | |_^ + | |_- required by `Foo3` + | + = help: consider adding a `where T: std::clone::Clone` bound error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> $DIR/defaults-suitability.rs:29:5 diff --git a/src/test/ui/associated-types/defaults-unsound-62211-1.stderr b/src/test/ui/associated-types/defaults-unsound-62211-1.stderr index 0cad08f6752..e8eb085b791 100644 --- a/src/test/ui/associated-types/defaults-unsound-62211-1.stderr +++ b/src/test/ui/associated-types/defaults-unsound-62211-1.stderr @@ -1,57 +1,49 @@ error[E0277]: the trait bound `Self: std::marker::Copy` is not satisfied --> $DIR/defaults-unsound-62211-1.rs:23:18 | +LL | trait UncheckedCopy: Sized { + | -------------------------- required by `UncheckedCopy` +... LL | type Output: Copy | ^^^^ the trait `std::marker::Copy` is not implemented for `Self` | = help: consider adding a `where Self: std::marker::Copy` bound -note: required by `UncheckedCopy` - --> $DIR/defaults-unsound-62211-1.rs:20:1 - | -LL | trait UncheckedCopy: Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: cannot add-assign `&'static str` to `Self` --> $DIR/defaults-unsound-62211-1.rs:27:7 | +LL | trait UncheckedCopy: Sized { + | -------------------------- required by `UncheckedCopy` +... LL | + AddAssign<&'static str> | ^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `Self += &'static str` | = help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `Self` = help: consider adding a `where Self: std::ops::AddAssign<&'static str>` bound -note: required by `UncheckedCopy` - --> $DIR/defaults-unsound-62211-1.rs:20:1 - | -LL | trait UncheckedCopy: Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `Self: std::ops::Deref` is not satisfied --> $DIR/defaults-unsound-62211-1.rs:25:7 | +LL | trait UncheckedCopy: Sized { + | -------------------------- required by `UncheckedCopy` +... LL | + Deref | ^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `Self` | = help: consider adding a `where Self: std::ops::Deref` bound -note: required by `UncheckedCopy` - --> $DIR/defaults-unsound-62211-1.rs:20:1 - | -LL | trait UncheckedCopy: Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `Self` doesn't implement `std::fmt::Display` --> $DIR/defaults-unsound-62211-1.rs:30:7 | +LL | trait UncheckedCopy: Sized { + | -------------------------- required by `UncheckedCopy` +... LL | + Display = Self; | ^^^^^^^ `Self` cannot be formatted with the default formatter | = help: the trait `std::fmt::Display` is not implemented for `Self` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = help: consider adding a `where Self: std::fmt::Display` bound -note: required by `UncheckedCopy` - --> $DIR/defaults-unsound-62211-1.rs:20:1 - | -LL | trait UncheckedCopy: Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `T` doesn't implement `std::fmt::Display` --> $DIR/defaults-unsound-62211-1.rs:43:9 diff --git a/src/test/ui/associated-types/defaults-unsound-62211-2.stderr b/src/test/ui/associated-types/defaults-unsound-62211-2.stderr index 3a57f7df055..a0b5d6b9cbb 100644 --- a/src/test/ui/associated-types/defaults-unsound-62211-2.stderr +++ b/src/test/ui/associated-types/defaults-unsound-62211-2.stderr @@ -1,57 +1,49 @@ error[E0277]: the trait bound `Self: std::marker::Copy` is not satisfied --> $DIR/defaults-unsound-62211-2.rs:23:18 | +LL | trait UncheckedCopy: Sized { + | -------------------------- required by `UncheckedCopy` +... LL | type Output: Copy | ^^^^ the trait `std::marker::Copy` is not implemented for `Self` | = help: consider adding a `where Self: std::marker::Copy` bound -note: required by `UncheckedCopy` - --> $DIR/defaults-unsound-62211-2.rs:20:1 - | -LL | trait UncheckedCopy: Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: cannot add-assign `&'static str` to `Self` --> $DIR/defaults-unsound-62211-2.rs:27:7 | +LL | trait UncheckedCopy: Sized { + | -------------------------- required by `UncheckedCopy` +... LL | + AddAssign<&'static str> | ^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `Self += &'static str` | = help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `Self` = help: consider adding a `where Self: std::ops::AddAssign<&'static str>` bound -note: required by `UncheckedCopy` - --> $DIR/defaults-unsound-62211-2.rs:20:1 - | -LL | trait UncheckedCopy: Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `Self: std::ops::Deref` is not satisfied --> $DIR/defaults-unsound-62211-2.rs:25:7 | +LL | trait UncheckedCopy: Sized { + | -------------------------- required by `UncheckedCopy` +... LL | + Deref | ^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `Self` | = help: consider adding a `where Self: std::ops::Deref` bound -note: required by `UncheckedCopy` - --> $DIR/defaults-unsound-62211-2.rs:20:1 - | -LL | trait UncheckedCopy: Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `Self` doesn't implement `std::fmt::Display` --> $DIR/defaults-unsound-62211-2.rs:30:7 | +LL | trait UncheckedCopy: Sized { + | -------------------------- required by `UncheckedCopy` +... LL | + Display = Self; | ^^^^^^^ `Self` cannot be formatted with the default formatter | = help: the trait `std::fmt::Display` is not implemented for `Self` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = help: consider adding a `where Self: std::fmt::Display` bound -note: required by `UncheckedCopy` - --> $DIR/defaults-unsound-62211-2.rs:20:1 - | -LL | trait UncheckedCopy: Sized { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `T` doesn't implement `std::fmt::Display` --> $DIR/defaults-unsound-62211-2.rs:43:9 diff --git a/src/test/ui/associated-types/issue-43924.stderr b/src/test/ui/associated-types/issue-43924.stderr index 67a963b5013..75a5b3f3551 100644 --- a/src/test/ui/associated-types/issue-43924.stderr +++ b/src/test/ui/associated-types/issue-43924.stderr @@ -1,14 +1,10 @@ error[E0277]: the trait bound `(dyn std::string::ToString + 'static): std::default::Default` is not satisfied --> $DIR/issue-43924.rs:7:15 | +LL | trait Foo { + | -------------------------------- required by `Foo` LL | type Out: Default + ToString + ?Sized = dyn ToString; | ^^^^^^^ the trait `std::default::Default` is not implemented for `(dyn std::string::ToString + 'static)` - | -note: required by `Foo` - --> $DIR/issue-43924.rs:6:1 - | -LL | trait Foo { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `(dyn std::string::ToString + 'static): std::default::Default` is not satisfied --> $DIR/issue-43924.rs:10:6 diff --git a/src/test/ui/associated-types/issue-54182-1.rs b/src/test/ui/associated-types/issue-54182-1.rs index 3e10f3fb7df..1a1e98cbac2 100644 --- a/src/test/ui/associated-types/issue-54182-1.rs +++ b/src/test/ui/associated-types/issue-54182-1.rs @@ -21,12 +21,12 @@ macro_rules! overload { } fn main() { - let r: () = overload!(42, true); + let () = overload!(42, true); let r: f32 = overload!("Hello world", 13.0); assert_eq!(r, 13.0); - let r: () = overload!(42, true, 42.5); + let () = overload!(42, true, 42.5); let r: i32 = overload!("Hello world", 13.0, 42); assert_eq!(r, 42); diff --git a/src/test/ui/associated-types/issue-63593.rs b/src/test/ui/associated-types/issue-63593.rs index 1452467f373..8dbc24c0673 100644 --- a/src/test/ui/associated-types/issue-63593.rs +++ b/src/test/ui/associated-types/issue-63593.rs @@ -9,3 +9,5 @@ trait MyTrait { type This = Self; //~ error: size for values of type `Self` cannot be known fn something>(i: I); } + +fn main() {} diff --git a/src/test/ui/associated-types/issue-63593.stderr b/src/test/ui/associated-types/issue-63593.stderr index ea462eac9b4..37dd52980d9 100644 --- a/src/test/ui/associated-types/issue-63593.stderr +++ b/src/test/ui/associated-types/issue-63593.stderr @@ -1,23 +1,15 @@ -error[E0601]: `main` function not found in crate `issue_63593` - | - = note: consider adding a `main` function to `$DIR/issue-63593.rs` - error[E0277]: the size for values of type `Self` cannot be known at compilation time --> $DIR/issue-63593.rs:9:5 | +LL | trait MyTrait { + | ------------- required by `MyTrait` LL | type This = Self; | ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `std::marker::Sized` is not implemented for `Self` = note: to learn more, visit = help: consider adding a `where Self: std::marker::Sized` bound -note: required by `MyTrait` - --> $DIR/issue-63593.rs:8:1 - | -LL | trait MyTrait { - | ^^^^^^^^^^^^^ -error: aborting due to 2 previous errors +error: aborting due to previous error -Some errors have detailed explanations: E0277, E0601. -For more information about an error, try `rustc --explain E0277`. +For more information about this error, try `rustc --explain E0277`.