Closed
Description
Code
fn main() {
println!("{:?}", []);
}
Current output
error[E0282]: type annotations needed
--> src/main.rs:2:22
|
2 | println!("{:?}", []);
| ^^ cannot infer type of the type parameter `T` declared on the associated function `new_debug`
Desired output
Not sure about the exact details, but with other generics the error looks like:
error[E0282]: type annotations needed
--> src/main.rs:3:22
|
3 | println!("{:?}", PhantomData);
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the struct `PhantomData`
|
Rationale and extra context
No response
Other cases
No response
Anything else?
No response