diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-08-26 16:34:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-26 16:34:11 +0200 |
| commit | 2708b26a3ba9c1fbdb44df037a3626ee5eb4657d (patch) | |
| tree | 559815d823c9a9583233fd214d9cc4f5223de666 /tests/ui/const-generics | |
| parent | 879bb220927556e6c1de6a0f020127129698e3de (diff) | |
| parent | 5e8c2c3aec19c50efc22854c09564844a133bbaf (diff) | |
| download | rust-2708b26a3ba9c1fbdb44df037a3626ee5eb4657d.tar.gz rust-2708b26a3ba9c1fbdb44df037a3626ee5eb4657d.zip | |
Rollup merge of #145481 - mu001999-contrib:fix/closure-sugg, r=SparrowLii
Add parentheses for closure when suggesting calling closure Fixes rust-lang/rust#145404
Diffstat (limited to 'tests/ui/const-generics')
| -rw-r--r-- | tests/ui/const-generics/adt_const_params/const_param_ty_bad.stderr | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_bad.stderr b/tests/ui/const-generics/adt_const_params/const_param_ty_bad.stderr index 4c8a5e46751..c05584ef909 100644 --- a/tests/ui/const-generics/adt_const_params/const_param_ty_bad.stderr +++ b/tests/ui/const-generics/adt_const_params/const_param_ty_bad.stderr @@ -32,8 +32,9 @@ LL | fn check(_: impl std::marker::UnsizedConstParamTy) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check` help: use parentheses to call this closure | -LL | check(|| {}()); - | ++ +LL - check(|| {}); +LL + check((|| {})()); + | error[E0277]: `fn()` can't be used as a const parameter type --> $DIR/const_param_ty_bad.rs:9:11 |
