]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr
Reword E0392 slightly
[rust.git] / src / test / ui / const-generics / const-param-type-depends-on-type-param.stderr
index c7dcbe1354266fde863fd807a784ab0bf642d765..b72c68036d701b8cc63b0b8e3513191b1e8425a2 100644 (file)
@@ -1,14 +1,16 @@
+error[E0671]: const parameters cannot depend on type parameters
+  --> $DIR/const-param-type-depends-on-type-param.rs:9:34
+   |
+LL | pub struct Dependent<T, const X: T>([(); X]);
+   |                                  ^ const parameter depends on type parameter
+
 warning: the feature `const_generics` is incomplete and may cause the compiler to crash
   --> $DIR/const-param-type-depends-on-type-param.rs:1:12
    |
 LL | #![feature(const_generics)]
    |            ^^^^^^^^^^^^^^
-
-error[E0671]: const parameters cannot depend on type parameters
-  --> $DIR/const-param-type-depends-on-type-param.rs:9:34
    |
-LL | pub struct Dependent<T, const X: T>([(); X]);
-   |                                  ^ const parameter depends on type parameter
+   = note: `#[warn(incomplete_features)]` on by default
 
 error[E0392]: parameter `T` is never used
   --> $DIR/const-param-type-depends-on-type-param.rs:9:22
@@ -16,7 +18,7 @@ error[E0392]: parameter `T` is never used
 LL | pub struct Dependent<T, const X: T>([(); X]);
    |                      ^ unused parameter
    |
-   = help: consider removing `T` or using a marker such as `std::marker::PhantomData`
+   = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData`
 
 error: aborting due to 2 previous errors