diff options
| author | tiif <pekyuan@gmail.com> | 2025-09-22 15:50:22 +0000 |
|---|---|---|
| committer | tiif <pekyuan@gmail.com> | 2025-09-24 13:29:23 +0000 |
| commit | 30289353e8e04eff33a0e533b6b398c308b24025 (patch) | |
| tree | 257214e6737c0d65edbc3e9c9d1b1dc878af6f13 /tests/ui/const-generics | |
| parent | 29005cb128e6d447e6bd9c110c9a684665f95985 (diff) | |
| download | rust-30289353e8e04eff33a0e533b6b398c308b24025.tar.gz rust-30289353e8e04eff33a0e533b6b398c308b24025.zip | |
Improve derive suggestion of const param
Make the suggestion not to remove the adt and use the name of the adt variant
Diffstat (limited to 'tests/ui/const-generics')
| -rw-r--r-- | tests/ui/const-generics/forbid-non-structural_match-types.stderr | 2 | ||||
| -rw-r--r-- | tests/ui/const-generics/issue-80471.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/const-generics/issues/issue-97278.stderr | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/ui/const-generics/forbid-non-structural_match-types.stderr b/tests/ui/const-generics/forbid-non-structural_match-types.stderr index 8ef629329f1..94afded9469 100644 --- a/tests/ui/const-generics/forbid-non-structural_match-types.stderr +++ b/tests/ui/const-generics/forbid-non-structural_match-types.stderr @@ -6,8 +6,8 @@ LL | struct D<const X: C>; | help: add `#[derive(ConstParamTy, PartialEq, Eq)]` to the struct | -LL - struct C; LL + #[derive(ConstParamTy, PartialEq, Eq)] +LL | struct C; | error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/issue-80471.stderr b/tests/ui/const-generics/issue-80471.stderr index 8cf3d68e5d6..fff2eb53cf1 100644 --- a/tests/ui/const-generics/issue-80471.stderr +++ b/tests/ui/const-generics/issue-80471.stderr @@ -4,10 +4,10 @@ error[E0741]: `Nat` must implement `ConstParamTy` to be used as the type of a co LL | fn foo<const N: Nat>() {} | ^^^ | -help: add `#[derive(ConstParamTy)]` to the struct +help: add `#[derive(ConstParamTy)]` to the enum | -LL - enum Nat { LL + #[derive(ConstParamTy)] +LL | enum Nat { | error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/issues/issue-97278.stderr b/tests/ui/const-generics/issues/issue-97278.stderr index 4894ddb7b8d..21a5fc94032 100644 --- a/tests/ui/const-generics/issues/issue-97278.stderr +++ b/tests/ui/const-generics/issues/issue-97278.stderr @@ -4,10 +4,10 @@ error[E0741]: `Bar` must implement `ConstParamTy` to be used as the type of a co LL | fn test<const BAR: Bar>() {} | ^^^ | -help: add `#[derive(ConstParamTy)]` to the struct +help: add `#[derive(ConstParamTy)]` to the enum | -LL - enum Bar { LL + #[derive(ConstParamTy)] +LL | enum Bar { | error: aborting due to 1 previous error |
