-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.T-libs-apiRelevant to the library API team, which will review and decide on the RFC.Relevant to the library API team, which will review and decide on the RFC.
Description
Especially in tests it can be extremely helpful to quickly initialize a map. Right now, you have to create an empty map and call insert
a couple of times.
fn main() {
let vec = [1, 2, 3, 4];
print!("{:?}", vec);
let map = {"foo": 0, "bar": 1};
// ^^^^^^^^^^^
// does not work
print!("{:?}", map);
}
See example at http://is.gd/P0yeNQ
Metadata
Metadata
Assignees
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.T-libs-apiRelevant to the library API team, which will review and decide on the RFC.Relevant to the library API team, which will review and decide on the RFC.