2020-11-22 19:54:31 -08:00
|
|
|
#![feature(auto_traits)]
|
2020-01-09 05:56:38 -05:00
|
|
|
#![feature(negative_impls)]
|
2018-12-16 16:18:45 +03:00
|
|
|
|
|
|
|
#[allow(private_in_public)]
|
|
|
|
mod m {
|
|
|
|
pub trait PubPrincipal {}
|
|
|
|
auto trait PrivNonPrincipal {}
|
2019-05-28 14:46:13 -04:00
|
|
|
pub fn leak_dyn_nonprincipal() -> Box<dyn PubPrincipal + PrivNonPrincipal> { loop {} }
|
2018-12-16 16:18:45 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
m::leak_dyn_nonprincipal();
|
2020-09-02 10:40:56 +03:00
|
|
|
//~^ ERROR trait `PrivNonPrincipal` is private
|
2018-12-16 16:18:45 +03:00
|
|
|
}
|