diff options
| author | mejrs <59372212+mejrs@users.noreply.github.com> | 2024-11-04 12:06:19 +0100 |
|---|---|---|
| committer | mejrs <59372212+mejrs@users.noreply.github.com> | 2024-11-04 12:06:19 +0100 |
| commit | 5a48fe2c202a7aff935daf6b7cc56a12ad0ae72a (patch) | |
| tree | 17da2caf7a1759639c18789b47d92ff9355ff5cd /tests/ui/diagnostic_namespace | |
| parent | 1e4f10ba6476e48a42a79b9f846a2d9366525b9e (diff) | |
| download | rust-5a48fe2c202a7aff935daf6b7cc56a12ad0ae72a.tar.gz rust-5a48fe2c202a7aff935daf6b7cc56a12ad0ae72a.zip | |
Suggest creating unary tuples
Diffstat (limited to 'tests/ui/diagnostic_namespace')
3 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/diagnostic_namespace/do_not_recommend/do_not_apply_attribute_without_feature_flag.stderr b/tests/ui/diagnostic_namespace/do_not_recommend/do_not_apply_attribute_without_feature_flag.stderr index e56af28f3fb..be17476524a 100644 --- a/tests/ui/diagnostic_namespace/do_not_recommend/do_not_apply_attribute_without_feature_flag.stderr +++ b/tests/ui/diagnostic_namespace/do_not_recommend/do_not_apply_attribute_without_feature_flag.stderr @@ -15,6 +15,10 @@ note: required by a bound in `check` | LL | fn check(a: impl Foo) {} | ^^^ required by this bound in `check` +help: use a unary tuple instead + | +LL | check(((),)); + | + ++ error: aborting due to 1 previous error diff --git a/tests/ui/diagnostic_namespace/do_not_recommend/supress_suggestions_in_help.current.stderr b/tests/ui/diagnostic_namespace/do_not_recommend/supress_suggestions_in_help.current.stderr index 629fc59361d..ca9a6ebc1c4 100644 --- a/tests/ui/diagnostic_namespace/do_not_recommend/supress_suggestions_in_help.current.stderr +++ b/tests/ui/diagnostic_namespace/do_not_recommend/supress_suggestions_in_help.current.stderr @@ -12,6 +12,10 @@ note: required by a bound in `check` | LL | fn check(a: impl Foo) {} | ^^^ required by this bound in `check` +help: use a unary tuple instead + | +LL | check(((),)); + | + ++ error: aborting due to 1 previous error diff --git a/tests/ui/diagnostic_namespace/do_not_recommend/supress_suggestions_in_help.next.stderr b/tests/ui/diagnostic_namespace/do_not_recommend/supress_suggestions_in_help.next.stderr index 629fc59361d..ca9a6ebc1c4 100644 --- a/tests/ui/diagnostic_namespace/do_not_recommend/supress_suggestions_in_help.next.stderr +++ b/tests/ui/diagnostic_namespace/do_not_recommend/supress_suggestions_in_help.next.stderr @@ -12,6 +12,10 @@ note: required by a bound in `check` | LL | fn check(a: impl Foo) {} | ^^^ required by this bound in `check` +help: use a unary tuple instead + | +LL | check(((),)); + | + ++ error: aborting due to 1 previous error |
