about summary refs log tree commit diff
path: root/tests/ui/const-generics
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-08-26 16:34:11 +0200
committerGitHub <noreply@github.com>2025-08-26 16:34:11 +0200
commit2708b26a3ba9c1fbdb44df037a3626ee5eb4657d (patch)
tree559815d823c9a9583233fd214d9cc4f5223de666 /tests/ui/const-generics
parent879bb220927556e6c1de6a0f020127129698e3de (diff)
parent5e8c2c3aec19c50efc22854c09564844a133bbaf (diff)
downloadrust-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.stderr5
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