adjust how closure/generator types and rvalues are printed
This commit is contained in:
parent
b30cefc775
commit
1fac304bf5
@ -36,7 +36,7 @@ fn main() {
|
||||
issue_10381();
|
||||
|
||||
// `Box::<Option<_>>::default()` would be valid here, but not `Box::default()` or
|
||||
// `Box::<Option<[closure@...]>::default()`
|
||||
// `Box::<Option<{closure@...}>::default()`
|
||||
//
|
||||
// Would have a suggestion after https://github.com/rust-lang/rust/blob/fdd030127cc68afec44a8d3f6341525dd34e50ae/compiler/rustc_middle/src/ty/diagnostics.rs#L554-L563
|
||||
let mut unnameable = Box::new(Option::default());
|
||||
|
@ -36,7 +36,7 @@ fn main() {
|
||||
issue_10381();
|
||||
|
||||
// `Box::<Option<_>>::default()` would be valid here, but not `Box::default()` or
|
||||
// `Box::<Option<[closure@...]>::default()`
|
||||
// `Box::<Option<{closure@...}>::default()`
|
||||
//
|
||||
// Would have a suggestion after https://github.com/rust-lang/rust/blob/fdd030127cc68afec44a8d3f6341525dd34e50ae/compiler/rustc_middle/src/ty/diagnostics.rs#L554-L563
|
||||
let mut unnameable = Box::new(Option::default());
|
||||
|
@ -27,7 +27,7 @@ LL | fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| x }]> {
|
||||
| ^^^^^^^^^^^ expected `usize`, found closure
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found closure `[closure@$DIR/ice-6251.rs:4:44: 4:53]`
|
||||
found closure `{closure@$DIR/ice-6251.rs:4:44: 4:53}`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user