blob: 61c6130e47019550cdba73b0dc163f41073446d4 [file] [log] [blame]
// compile-pass
#![feature(existential_type)]
#![deny(private_in_public)]
pub existential type Pub: Default;
#[derive(Default)]
struct Priv;
fn check() -> Pub {
Priv
}
pub trait Trait {
type Pub: Default;
fn method() -> Self::Pub;
}
impl Trait for u8 {
existential type Pub: Default;
fn method() -> Self::Pub { Priv }
}
fn main() {}