You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of rust-lang#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.
Copy file name to clipboardExpand all lines: tests/ui/box_default.fixed
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ fn main() {
36
36
issue_10381();
37
37
38
38
// `Box::<Option<_>>::default()` would be valid here, but not `Box::default()` or
39
-
// `Box::<Option<[closure@...]>::default()`
39
+
// `Box::<Option<{closure@...}>::default()`
40
40
//
41
41
// Would have a suggestion after https://github.com/rust-lang/rust/blob/fdd030127cc68afec44a8d3f6341525dd34e50ae/compiler/rustc_middle/src/ty/diagnostics.rs#L554-L563
Copy file name to clipboardExpand all lines: tests/ui/box_default.rs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ fn main() {
36
36
issue_10381();
37
37
38
38
// `Box::<Option<_>>::default()` would be valid here, but not `Box::default()` or
39
-
// `Box::<Option<[closure@...]>::default()`
39
+
// `Box::<Option<{closure@...}>::default()`
40
40
//
41
41
// Would have a suggestion after https://github.com/rust-lang/rust/blob/fdd030127cc68afec44a8d3f6341525dd34e50ae/compiler/rustc_middle/src/ty/diagnostics.rs#L554-L563
0 commit comments