]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-6458.stderr
Rollup merge of #100168 - WaffleLapkin:improve_diagnostics_for_missing_type_in_a_cons...
[rust.git] / src / test / ui / issues / issue-6458.stderr
index f548692d785830f649b0ba637b89f75da3aac0e7..2e93c13855f565ec95fb2b6fd965078e81e4b135 100644 (file)
@@ -1,14 +1,13 @@
 error[E0282]: type annotations needed
-  --> $DIR/issue-6458.rs:9:4
+  --> $DIR/issue-6458.rs:9:22
    |
 LL |    foo(TypeWithState(marker::PhantomData));
-   |    ^^^ cannot infer type for type parameter `State` declared on the function `foo`
+   |                      ^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the struct `PhantomData`
    |
-help: type parameter declared here
-  --> $DIR/issue-6458.rs:6:12
+help: consider specifying the generic argument
    |
-LL | pub fn foo<State>(_: TypeWithState<State>) {}
-   |            ^^^^^
+LL |    foo(TypeWithState(marker::PhantomData::<T>));
+   |                                         +++++
 
 error: aborting due to previous error