There are three problems with allowing unstable features on the stable release.
First, as the web has shown numerous times, merely advertising instability doesn't work. Once features are in wide use it is very hard to change them -- and once features are available at all, it is very hard to prevent them from being used. Mechanisms like "vendor prefixes" on the web that were meant to support experimentation instead led to de facto standardization.
Second, unstable features are by definition work in progress. But the beta/stable snapshots freeze the feature at scheduled points in time, while library authors will want to work with the latest version of the feature.
Finally, we simply cannot deliver stability for Rust unless we enforce it. Our promise is that, if you are using the stable release of Rust, you will never dread upgrading to the next release. If libraries could opt in to instability, then we could only keep this promise if all library authors guaranteed the same thing by supporting all three release channels simultaneously.
It's not realistic or necessary for the entire ecosystem to flawlessly deal with these problems. Instead, we will enforce that stable means stable: the stable channel provides only stable features.
While we have a hole to allow for bootstrapping from beta/stable and in the future -Zbuild-std, it is just that a hole, not something stable.
There is already prior art for this. For example the panic_immediate_abort, backtrace and panic_unwind features of libstd.
core by definition uses unstable features. It is the integration between the compiler and user code. It uses many compiler intrinsics to provide basic features. These intrinsics will and have changed (see History for library/core/src/intrinsics.rs - rust-lang/rust · GitHub)
I know very well core requires compiler magic to implement certain bits plus it takes advantage of unstable features. That is not the discussion at hand.
Unlike many languages we have deliberately chosen to not allow the use of unstable features on stable compilers. See Stability as a Deliverable | Rust Blog
I know, but that is orthogonal. core may use unstable features, yet be able to be compiled by a stable compiler; e.g. it can be special cased, or we could fork it, or a flag could be provided (e.g. like for bootstrapping), or core could slowly decrease the number of unstable features used as the language matures, etc.
The policy of not allowing to opt-in to unstable features on stable compilers is just a policy (one that I personally don't agree with because it makes things more painful for users and companies; and it can be shown it can be done in compilers just fine, even with commercially supported clients, as other compilers achieve -- but discussing that policy is off-topic because even if one enforces such a policy, the above can still be done nevertheless).
There is already prior art for this. For example the panic_immediate_abort , backtrace and panic_unwind features of libstd.
Yeah, more of those would be nice, as we discussed the other day in GitHub.
@bjorn3 Yes my bet is at some point, rustc will come with signatures for standard library crates' src, so in stable mode it can compile just that code. There was foot dragging on this in the past, but it allows user-driven builds all the way down without compromising stability, as the (stable portion of the) interface of core is stable, even if its implementation isn't. Since the user can't modify core without invalidating the signature, there is no risk of them getting something outside that stable interface.
Incidentally, this could be a good argument for buildings stage1 rustc with stage0 std, because that one would be signed by the stage0 rustc, while the new std that postdates stage0 rust wouldn't be, so only with that modified bootstrap could we get rid off RUSTC_BOOTSTRAP.
Would it be even better if rustc included (a compressed copy of) core sources right into its binary?
Update: it does seem like it could even include sources for all of std as well
Indeed those sources are needed to compile regular code so no waste of disk space.