更新时间:2023-11-10 14:06:34
您需要通过将 #![feature(collections)]
放在 crate 的根源文件顶部来明确选择加入.使用夜间编译器仅允许您使用不稳定的功能,它不会自动启用它们.
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.
另见这个相关的SO问题.