2020-11-22 21:54:31 -06:00
|
|
|
#![feature(auto_traits)]
|
2020-01-09 04:56:38 -06:00
|
|
|
#![feature(negative_impls)]
|
2018-12-16 07:18:45 -06:00
|
|
|
|
|
|
|
#[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();
|
2020-09-02 02:40:56 -05:00
|
|
|
//~^ ERROR trait `PrivNonPrincipal` is private
|
2018-12-16 07:18:45 -06:00
|
|
|
}
|