3 ms·
Dependencies are not allowed to use unstable features either with the stable compiler. The only exception is the standard library, which uses numerous unstable
by paavohtl 3y ago
Dependencies are not allowed to use unstable features either with the stable compiler. The only exception is the standard library, which uses numerous unstable features even with a stable distribution of Rust.
- tialaramex 3y agoWorth briefly explaining the rationale for this (stdlib gets to use unstable features) Rust's stdlib is maintained with the rest of the language and by the same broad team, so, if you're tweaking unstable feature X, you are also responsible for ensuring the stdlib people using feature X sort that out. I'm not sure if Rust's internal policies mean you shouldn't land a change to the main tree without accompanying stdlib patches, or whether you're only required to give them adequate notice, but either way it's not going out the door in a stable release being incompatible with its own implementation. This couldn't really work with 3rd party libraries.
- jcranmer 3y agoThere's a second category of unstable features to mention here. Some of the features are essentially perma-unstable, because they're exposing some compiler intrinsics for the library to be able to use. This is the equivalent of things like __builtin_* for C compilers.