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