blob: 6dfd2d10870e076dfc7d077488a429f2a1ecf76c [file] [log] [blame]
// Check that existential types must be ungated to use the `existential` keyword
existential type Foo: std::fmt::Debug; //~ ERROR existential types are unstable
trait Bar {
type Baa: std::fmt::Debug;
fn define() -> Self::Baa;
}
impl Bar for () {
existential type Baa: std::fmt::Debug; //~ ERROR existential types are unstable
fn define() -> Self::Baa { 0 }
}
fn define() -> Foo { 0 }
fn main() {}