2018-12-16 07:18:45 -06:00
|
|
|
#![feature(optin_builtin_traits)]
|
|
|
|
|
|
|
|
#[allow(private_in_public)]
|
|
|
|
mod m {
|
|
|
|
pub trait PubPrincipal {}
|
|
|
|
auto trait PrivNonPrincipal {}
|
2019-05-28 13:46:13 -05:00
|
|
|
pub fn leak_dyn_nonprincipal() -> Box<dyn PubPrincipal + PrivNonPrincipal> { loop {} }
|
2018-12-16 07:18:45 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
m::leak_dyn_nonprincipal();
|
2018-12-30 18:02:40 -06:00
|
|
|
//~^ ERROR trait `m::PrivNonPrincipal` is private
|
2018-12-16 07:18:45 -06:00
|
|
|
}
|