privacy: Fix private-in-public check for existential types

This commit is contained in:
Vadim Petrochenkov 2019-01-13 00:41:11 +03:00
parent d6525ef539
commit f8028b0b6c
2 changed files with 23 additions and 3 deletions

View file

@ -0,0 +1,15 @@
// compile-pass
#![feature(existential_type)]
#![deny(private_in_public)]
pub existential type Pub: Default;
#[derive(Default)]
struct Priv;
fn check() -> Pub {
Priv
}
fn main() {}