]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/type-inference/unbounded-associated-type.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / type-inference / unbounded-associated-type.stderr
index 19e2bd4513dc51ded1545baf22dfbfca5f8f5c0e..e0fecc72f30928c68bb0e8f6be80b30836123af3 100644 (file)
@@ -1,14 +1,13 @@
 error[E0282]: type annotations needed
-  --> $DIR/unbounded-associated-type.rs:15:5
+  --> $DIR/unbounded-associated-type.rs:15:7
    |
-LL |     type A;
-   |     ------- `<Self as T>::A` defined here
-...
 LL |     S(std::marker::PhantomData).foo();
-   |     ^--------------------------------
-   |     |
-   |     this method call resolves to `<Self as T>::A`
-   |     cannot infer type for type parameter `X` declared on the struct `S`
+   |       ^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the struct `PhantomData`
+   |
+help: consider specifying the generic argument
+   |
+LL |     S(std::marker::PhantomData::<T>).foo();
+   |                               +++++
 
 error: aborting due to previous error