Seal the CommandExt, OsStrExt and OsStringExt traits

This commit is contained in:
Amanieu d'Antras 2021-02-10 21:30:30 +00:00
parent 07194ffcd2
commit bfd1ccfb27
7 changed files with 54 additions and 30 deletions

View file

@ -582,3 +582,11 @@ include!("keyword_docs.rs");
// is unconditional, so the unstable feature needs to be defined somewhere.
#[unstable(feature = "restricted_std", issue = "none")]
mod __restricted_std_workaround {}
mod sealed {
/// This trait being unreachable from outside the crate
/// prevents outside implementations of our extension traits.
/// This allows adding more trait methods in the future.
#[unstable(feature = "sealed", issue = "none")]
pub trait Sealed {}
}