rust/tests/ui/const-generics/kind_mismatch.stderr
Esteban Küber 35cb28b7cf Verbose suggestion to make param const
```
error[E0747]: type provided when a constant was expected
  --> $DIR/invalid-const-arguments.rs:10:19
   |
LL | impl<N> Foo for B<N> {}
   |                   ^
   |
help: consider changing this type parameter to a const parameter
   |
LL - impl<N> Foo for B<N> {}
LL + impl<const N: u8> Foo for B<N> {}
   |
```
2025-06-04 21:23:11 +00:00

28 lines
843 B
Plaintext

error[E0747]: type provided when a constant was expected
--> $DIR/kind_mismatch.rs:11:38
|
LL | impl<K> ContainsKey<K> for KeyHolder<K> {}
| ^
|
help: consider changing this type parameter to a const parameter
|
LL - impl<K> ContainsKey<K> for KeyHolder<K> {}
LL + impl<const K: u8> ContainsKey<K> for KeyHolder<K> {}
|
error[E0747]: type provided when a constant was expected
--> $DIR/kind_mismatch.rs:11:21
|
LL | impl<K> ContainsKey<K> for KeyHolder<K> {}
| ^
|
help: consider changing this type parameter to a const parameter
|
LL - impl<K> ContainsKey<K> for KeyHolder<K> {}
LL + impl<const K: u8> ContainsKey<K> for KeyHolder<K> {}
|
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0747`.