-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.