You need to explicitly opt-in by placing #![feature(collections)]
at the top of your crate’s root source file. Using a nightly compiler merely permits you to use unstable features, it doesn’t automatically enable them.
See also this related SO question.