-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-inferenceArea: Type inferenceArea: Type inferenceT-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.T-langRelevant to the language teamRelevant to the language team
Description
extern crate serde_json; // Code works fine if you remove this line.
fn main() {
Vec::<u8>::new() == [];
}
That produces:
error[E0282]: type annotations needed
--> src/main.rs:4:25
|
4 | Vec::<u8>::new() == [];
| ^^ cannot infer type
Somehow, referencing serde_json
makes rustc unable to infer some type here. This happens on both the current stable and nightly versions of Rust.
Metadata
Metadata
Assignees
Labels
A-inferenceArea: Type inferenceArea: Type inferenceT-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.T-langRelevant to the language teamRelevant to the language team