They used to be covered by `optin_builtin_traits` but negative impls are now applicable to all traits, not just auto traits. This also adds docs in the unstable book for the current state of auto traits.
12 lines
466 B
Rust
12 lines
466 B
Rust
#![feature(negative_impls)]
|
|
|
|
// @matches negative_impl/struct.Alpha.html '//pre' "pub struct Alpha"
|
|
pub struct Alpha;
|
|
// @matches negative_impl/struct.Bravo.html '//pre' "pub struct Bravo<B>"
|
|
pub struct Bravo<B>(B);
|
|
|
|
// @matches negative_impl/struct.Alpha.html '//*[@class="impl"]//code' "impl !Send for Alpha"
|
|
impl !Send for Alpha {}
|
|
|
|
// @matches negative_impl/struct.Bravo.html '//*[@class="impl"]//code' "impl<B> !Send for Bravo<B>"
|
|
impl<B> !Send for Bravo<B> {}
|