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 /compiler/rustc_infer/src | |
| 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 'compiler/rustc_infer/src')
| -rw-r--r-- | compiler/rustc_infer/src/infer/error_reporting/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index 2ca5b7d657d..1beb13cb94c 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -1616,7 +1616,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { // | expected `()`, found closure // | // = note: expected unit type `()` - // found closure `[closure@$DIR/issue-20862.rs:2:5: 2:14 x:_]` + // found closure `{closure@$DIR/issue-20862.rs:2:5: 2:14 x:_}` // // Also ignore opaque `Future`s that come from async fns. if !self.ignore_span.overlaps(span) |
