-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-inferenceArea: Type inferenceArea: Type inferenceC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-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
The program
extern crate collections;
use collections::treemap::TreeMap;
fn main() {
let mut a = TreeMap::new();
a.insert(0, 1);
a.insert(0, "foo");
}
gives the type error
treemap-test.rs:7:17: 7:22 error: mismatched types: expected `<generic integer #1>` but found `&'static str` (expected integral variable but found &-ptr)
treemap-test.rs:7 a.insert(0, "foo");
^~~~~
This error should indicate the source of the expectation that the type parameter is integral.
oli-obk
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-inferenceArea: Type inferenceArea: Type inferenceC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-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.