mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
14 lines
275 B
Rust
14 lines
275 B
Rust
#![feature(negative_impls)]
|
|
#![feature(auto_traits)]
|
|
|
|
auto trait AutoTrait {}
|
|
|
|
impl<T> !AutoTrait for [T] {}
|
|
|
|
fn needs_auto_trait<T: AutoTrait + ?Sized>() {}
|
|
|
|
fn main() {
|
|
needs_auto_trait::<str>();
|
|
//~^ ERROR the trait bound `[u8]: AutoTrait` is not satisfied in `str`
|
|
}
|