blob: 01a98a308950a84b4cc072b4df7c8c63050c5ca8 [file] [log] [blame]
// compile-flags: -Znext-solver
#![feature(negative_bounds, negative_impls)]
trait Trait {}
impl !Trait for () {}
fn produce() -> impl !Trait {}
fn consume(_: impl Trait) {}
fn main() {
consume(produce()); //~ ERROR the trait bound `impl !Trait: Trait` is not satisfied
}
fn weird0() -> impl Sized + !Sized {}
//~^ ERROR type mismatch resolving `() == impl !Sized + Sized`
fn weird1() -> impl !Sized + Sized {}
//~^ ERROR type mismatch resolving `() == impl !Sized + Sized`
fn weird2() -> impl !Sized {}
//~^ ERROR type mismatch resolving `() == impl !Sized`