]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/associated-types/defaults-suitability.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / associated-types / defaults-suitability.stderr
index 60e1821b300d249a054ac2ab4080b2de0ac25a5a..3f6702da2a4a2bf4f8a0a12867f7fa1d3234a3b7 100644 (file)
@@ -23,12 +23,11 @@ LL | trait Foo<T> {
 LL |     type Bar: Clone = Vec<T>;
    |               ^^^^^ the trait `std::clone::Clone` is not implemented for `T`
    |
-help: consider restricting this type parameter with `T: std::clone::Clone`
-  --> $DIR/defaults-suitability.rs:32:11
-   |
-LL | trait Foo<T> {
-   |           ^
    = note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<T>`
+help: consider restricting type parameter `T`
+   |
+LL | trait Foo<T: std::clone::Clone> {
+   |            ^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `(): Foo<Self>` is not satisfied
   --> $DIR/defaults-suitability.rs:39:17
@@ -119,21 +118,24 @@ LL | |     type Baz = T;
 LL | | }
    | |_- required by `Foo3`
    |
-help: consider restricting this type parameter with `where T: std::clone::Clone`
-  --> $DIR/defaults-suitability.rs:88:12
+help: consider further restricting type parameter `T`
    |
-LL | trait Foo3<T> where
-   |            ^
+LL |     Self::Baz: Clone, T: std::clone::Clone
+   |                     ^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
   --> $DIR/defaults-suitability.rs:27:5
    |
 LL |     type Ty = Vec<[u8]>;
    |     ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   | 
+  ::: $SRC_DIR/liballoc/vec.rs:LL:COL
+   |
+LL | pub struct Vec<T> {
+   |                - required by this bound in `std::vec::Vec`
    |
    = help: the trait `std::marker::Sized` is not implemented for `[u8]`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
-   = note: required by `std::vec::Vec`
 
 error: aborting due to 11 previous errors