about summary refs log tree commit diff
path: root/tests/ui/pattern
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-22 15:19:38 +0000
committerbors <bors@rust-lang.org>2023-09-22 15:19:38 +0000
commit959b2c703d45f06962da3afa086bdda70d42efcf (patch)
tree3fcd95b0de658e25157685270746b934c8f73154 /tests/ui/pattern
parent01903944d8c7e3cfdba88c9c7dbc09475b37d986 (diff)
parentc4ec12f4b701d9be95143f3fa77b1f1af07de18c (diff)
downloadrust-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/pattern')
-rw-r--r--tests/ui/pattern/non-structural-match-types.stderr4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/pattern/non-structural-match-types.stderr b/tests/ui/pattern/non-structural-match-types.stderr
index dea7c4695cc..43d92775e88 100644
--- a/tests/ui/pattern/non-structural-match-types.stderr
+++ b/tests/ui/pattern/non-structural-match-types.stderr
@@ -1,10 +1,10 @@
-error: `[closure@$DIR/non-structural-match-types.rs:9:17: 9:19]` cannot be used in patterns
+error: `{closure@$DIR/non-structural-match-types.rs:9:17: 9:19}` cannot be used in patterns
   --> $DIR/non-structural-match-types.rs:9:9
    |
 LL |         const { || {} } => {},
    |         ^^^^^^^^^^^^^^^
 
-error: `[async block@$DIR/non-structural-match-types.rs:12:17: 12:25]` cannot be used in patterns
+error: `{async block@$DIR/non-structural-match-types.rs:12:17: 12:25}` cannot be used in patterns
   --> $DIR/non-structural-match-types.rs:12:9
    |
 LL |         const { async {} } => {},