mirror of https://github.com/rust-lang/rust.git
23 lines
411 B
Rust
23 lines
411 B
Rust
//@ check-pass
|
|
|
|
#![feature(auto_traits, negative_impls)]
|
|
|
|
auto trait Foo {}
|
|
auto trait Bar {}
|
|
|
|
struct NeedsOutlives<'a, T>(&'a T);
|
|
|
|
impl<'a, T: 'a> !Foo for NeedsOutlives<'a, T> {}
|
|
|
|
// Leaving out the lifetime bound
|
|
impl<'a, T> !Bar for NeedsOutlives<'a, T> {}
|
|
|
|
struct NeedsSend<T: Send>(T);
|
|
|
|
impl<T: Send> !Foo for NeedsSend<T> {}
|
|
|
|
// Leaving off the trait bound
|
|
impl<T> !Bar for NeedsSend<T> {}
|
|
|
|
fn main() {}
|