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.
This commit is contained in:
commit
959b2c703d
191 changed files with 477 additions and 477 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue