]> git.lizzy.rs Git - rust.git/commitdiff
Update tests after compiletest changes
authorJonas Schievink <jonasschievink@gmail.com>
Sun, 15 Sep 2019 14:52:02 +0000 (16:52 +0200)
committerJonas Schievink <jonasschievink@gmail.com>
Fri, 21 Feb 2020 18:41:22 +0000 (19:41 +0100)
src/test/ui/associated-types/defaults-suitability.stderr
src/test/ui/associated-types/defaults-unsound-62211-1.stderr
src/test/ui/associated-types/defaults-unsound-62211-2.stderr
src/test/ui/associated-types/issue-43924.stderr
src/test/ui/associated-types/issue-54182-1.rs
src/test/ui/associated-types/issue-63593.rs
src/test/ui/associated-types/issue-63593.stderr

index 9a7febeb62de09fa6aa5c71862a97f7171ee7935..dd45c9e4436680b01142b28106dcc6f92c3de095 100644 (file)
 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<T> {
+   | ------------ required by `Foo`
 LL |     type Bar: Clone = Vec<T>;
    |               ^^^^^ 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<T>`
-note: required by `Foo`
-  --> $DIR/defaults-suitability.rs:34:1
-   |
-LL | trait Foo<T> {
-   | ^^^^^^^^^^^^
 
 error[E0277]: the trait bound `(): Foo<Self>` is not satisfied
   --> $DIR/defaults-suitability.rs:41:17
    |
+LL | trait Bar: Sized {
+   | ---------------- required by `Bar`
+LL |     // `(): Foo<Self>` might hold for some possible impls but not all.
 LL |     type Assoc: Foo<Self> = ();
    |                 ^^^^^^^^^ the trait `Foo<Self>` 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<NotClone>` is not satisfied
   --> $DIR/defaults-suitability.rs:61:18
    |
-LL |     Self::Assoc: IsU8<Self::Assoc>,
-   |                  ^^^^^^^^^^^^^^^^^ the trait `IsU8<NotClone>` is not implemented for `NotClone`
-   |
-note: required by `D`
-  --> $DIR/defaults-suitability.rs:58:1
-   |
 LL | / trait D where
 LL | |     Vec<Self::Assoc>: Clone,
 LL | |
 LL | |     Self::Assoc: IsU8<Self::Assoc>,
+   | |                  ^^^^^^^^^^^^^^^^^ the trait `IsU8<NotClone>` is not implemented for `NotClone`
 ...  |
 LL | |     type Assoc = NotClone;
 LL | | }
-   | |_^
+   | |_- required by `D`
 
 error[E0277]: the trait bound `bool: IsU8<NotClone>` is not satisfied
   --> $DIR/defaults-suitability.rs:63:11
    |
-LL |     bool: IsU8<Self::Assoc>,
-   |           ^^^^^^^^^^^^^^^^^ the trait `IsU8<NotClone>` is not implemented for `bool`
-   |
-note: required by `D`
-  --> $DIR/defaults-suitability.rs:58:1
-   |
 LL | / trait D where
 LL | |     Vec<Self::Assoc>: Clone,
 LL | |
 LL | |     Self::Assoc: IsU8<Self::Assoc>,
+LL | |
+LL | |     bool: IsU8<Self::Assoc>,
+   | |           ^^^^^^^^^^^^^^^^^ the trait `IsU8<NotClone>` 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<Self::Assoc>: 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<NotClone>`
-note: required by `D`
-  --> $DIR/defaults-suitability.rs:58:1
-   |
 LL | / trait D where
 LL | |     Vec<Self::Assoc>: Clone,
+   | |                       ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone`
 LL | |
 LL | |     Self::Assoc: IsU8<Self::Assoc>,
 ...  |
 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<NotClone>`
 
 error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: std::clone::Clone` is not satisfied
   --> $DIR/defaults-suitability.rs:74:15
    |
+LL | trait Foo2<T> {
+   | ------------- required by `Foo2`
 LL |     type Bar: Clone = Vec<Self::Baz>;
    |               ^^^^^ the trait `std::clone::Clone` is not implemented for `<Self as Foo2<T>>::Baz`
    |
    = help: consider adding a `where <Self as Foo2<T>>::Baz: std::clone::Clone` bound
    = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<<Self as Foo2<T>>::Baz>`
-note: required by `Foo2`
-  --> $DIR/defaults-suitability.rs:73:1
-   |
-LL | trait Foo2<T> {
-   | ^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: std::clone::Clone` is not satisfied
   --> $DIR/defaults-suitability.rs:83:15
    |
+LL | trait Foo25<T: Clone> {
+   | --------------------- required by `Foo25`
 LL |     type Bar: Clone = Vec<Self::Baz>;
    |               ^^^^^ the trait `std::clone::Clone` is not implemented for `<Self as Foo25<T>>::Baz`
    |
    = help: consider adding a `where <Self as Foo25<T>>::Baz: std::clone::Clone` bound
    = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<<Self as Foo25<T>>::Baz>`
-note: required by `Foo25`
-  --> $DIR/defaults-suitability.rs:82:1
-   |
-LL | trait Foo25<T: Clone> {
-   | ^^^^^^^^^^^^^^^^^^^^^
 
 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<T> 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
index 0cad08f67522383684152d67bf0f55bc9e57d801..e8eb085b791463548e44a90913fc3d60332fb01f 100644 (file)
@@ -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<Target = str>
    |       ^^^^^^^^^^^^^^^^^^^ 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
index 3a57f7df055fd6ab524b7d500c246ab73026b9e4..a0b5d6b9cbb46e774ee2c45ceda743368a94bc8b 100644 (file)
@@ -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<Target = str>
    |       ^^^^^^^^^^^^^^^^^^^ 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
index 67a963b501357d27489074751e90e0cf5653ab2f..75a5b3f3551cb8d292a8045a8e0e721c76789949 100644 (file)
@@ -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<T: Default + ToString> {
+   | -------------------------------- 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<T: Default + ToString> {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `(dyn std::string::ToString + 'static): std::default::Default` is not satisfied
   --> $DIR/issue-43924.rs:10:6
index 3e10f3fb7dff3f2e93a145fe7ad1a7873b750d4a..1a1e98cbac27f4a74c9aa520a94abcf49aaa9ed9 100644 (file)
@@ -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);
index 1452467f3736ee236a5c30473948b53d96bb73ce..8dbc24c0673209949fa223d73e73bcb2d9a5d83d 100644 (file)
@@ -9,3 +9,5 @@ trait MyTrait {
     type This = Self;  //~ error: size for values of type `Self` cannot be known
     fn something<I: Inner<Self::This>>(i: I);
 }
+
+fn main() {}
index ea462eac9b4d3e17968eca5f3be0cd42f0cbea31..37dd52980d996efbe98d0d7c541a9e0e96ee4d0f 100644 (file)
@@ -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 <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
    = 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`.