rust/tests/ui/const-generics/issue-80471.stderr
tiif 30289353e8 Improve derive suggestion of const param
Make the suggestion not to remove the adt and use the name of the adt
variant
2025-09-24 13:29:23 +00:00

16 lines
412 B
Plaintext

error[E0741]: `Nat` must implement `ConstParamTy` to be used as the type of a const generic parameter
--> $DIR/issue-80471.rs:9:17
|
LL | fn foo<const N: Nat>() {}
| ^^^
|
help: add `#[derive(ConstParamTy)]` to the enum
|
LL + #[derive(ConstParamTy)]
LL | enum Nat {
|
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0741`.