diff options
| author | bors <bors@rust-lang.org> | 2023-09-22 15:19:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-22 15:19:38 +0000 |
| commit | 959b2c703d45f06962da3afa086bdda70d42efcf (patch) | |
| tree | 3fcd95b0de658e25157685270746b934c8f73154 /tests/ui/parser | |
| parent | 01903944d8c7e3cfdba88c9c7dbc09475b37d986 (diff) | |
| parent | c4ec12f4b701d9be95143f3fa77b1f1af07de18c (diff) | |
| download | rust-959b2c703d45f06962da3afa086bdda70d42efcf.tar.gz rust-959b2c703d45f06962da3afa086bdda70d42efcf.zip | |
Auto merge of #115696 - RalfJung:closure-ty-print, r=oli-obk
adjust how closure/generator types are printed I saw `&[closure@$DIR/issue-20862.rs:2:5]` and I thought it is a slice type, because that's usually what `&[_]` is... it took me a while to realize that this is just a confusing printer and actually there's no slice. Let's use something that cannot be mistaken for a regular type.
Diffstat (limited to 'tests/ui/parser')
| -rw-r--r-- | tests/ui/parser/expr-as-stmt.stderr | 2 | ||||
| -rw-r--r-- | tests/ui/parser/struct-literal-restrictions-in-lamda.stderr | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/parser/expr-as-stmt.stderr b/tests/ui/parser/expr-as-stmt.stderr index 18c8b0b7c50..76a83aa0161 100644 --- a/tests/ui/parser/expr-as-stmt.stderr +++ b/tests/ui/parser/expr-as-stmt.stderr @@ -217,7 +217,7 @@ LL | { true } || { true } | ^^^^^^^^^^^ expected `bool`, found closure | = note: expected type `bool` - found closure `[closure@$DIR/expr-as-stmt.rs:51:14: 51:16]` + found closure `{closure@$DIR/expr-as-stmt.rs:51:14: 51:16}` help: parentheses are required to parse this as an expression | LL | ({ true }) || { true } diff --git a/tests/ui/parser/struct-literal-restrictions-in-lamda.stderr b/tests/ui/parser/struct-literal-restrictions-in-lamda.stderr index 0852c7cb470..c715486e2da 100644 --- a/tests/ui/parser/struct-literal-restrictions-in-lamda.stderr +++ b/tests/ui/parser/struct-literal-restrictions-in-lamda.stderr @@ -24,7 +24,7 @@ LL | | }.hi() { | |__________^ expected `bool`, found closure | = note: expected type `bool` - found closure `[closure@$DIR/struct-literal-restrictions-in-lamda.rs:12:11: 12:13]` + found closure `{closure@$DIR/struct-literal-restrictions-in-lamda.rs:12:11: 12:13}` help: use parentheses to call this closure | LL ~ while (|| Foo { |
