File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757//! }
5858//! ```
5959//!
60+ //! Note that it is generally a bad idea to automatically use a feature just
61+ //! because it is supported. Nightly features are unstable by their very nature,
62+ //! so a crate that automatically makes use of nightly features is prone to
63+ //! breakage: if the feature changes in rustc in an incompatible way, then a
64+ //! crate that automatically uses the feature will fail to build for everyone
65+ //! using nightly! The recommended practice is to make using nightly features
66+ //! opt-in (e.g. via a crate feature), so that people only experience broken
67+ //! builds when they explicitly asked for a nightly feature.
68+ //!
6069//! * Check that the running compiler is on the stable channel:
6170//!
6271//! ```rust
@@ -277,6 +286,15 @@ pub fn is_feature_flaggable() -> Option<bool> {
277286/// `CARGO_ENCODED_RUSTFLAGS`. If the version could not be determined, returns
278287/// `None`.
279288///
289+ /// Note that it is generally a bad idea to automatically use a feature just
290+ /// because it is supported. Nightly features are unstable by their very nature,
291+ /// so a crate that automatically makes use of nightly features is prone to
292+ /// breakage: if the feature changes in rustc in an incompatible way, then a
293+ /// crate that automatically uses the feature will fail to build for everyone
294+ /// using nightly! The recommended practice is to make using nightly features
295+ /// opt-in (e.g. via a crate feature), so that people only experience broken
296+ /// builds when they explicitly asked for a nightly feature.
297+ ///
280298/// # Example
281299///
282300/// ```rust
You can’t perform that action at this time.
0 commit comments