2020-11-22 19:54:31 -08:00
|
|
|
#![feature(auto_traits)]
|
2020-01-09 05:56:38 -05:00
|
|
|
#![feature(negative_impls)]
|
2024-01-26 17:14:38 +01:00
|
|
|
#![allow(non_local_definitions)]
|
2023-05-18 14:57:45 +03:00
|
|
|
|
2018-12-16 16:18:45 +03:00
|
|
|
pub trait PubPrincipal {}
|
|
|
|
|
auto trait PrivNonPrincipal {}
|
|
|
|
|
|
2019-05-28 14:46:13 -04:00
|
|
|
pub fn leak_dyn_nonprincipal() -> Box<dyn PubPrincipal + PrivNonPrincipal> { loop {} }
|
2023-06-19 17:06:00 +03:00
|
|
|
//~^ WARN trait `PrivNonPrincipal` is more private than the item `leak_dyn_nonprincipal`
|
2018-12-16 16:18:45 +03:00
|
|
|
|
|
|
|
|
#[deny(missing_docs)]
|
|
|
|
|
fn container() {
|
|
|
|
|
impl dyn PubPrincipal {
|
2020-03-21 19:47:23 -05:00
|
|
|
pub fn check_doc_lint() {} //~ ERROR missing documentation for an associated function
|
2018-12-16 16:18:45 +03:00
|
|
|
}
|
|
|
|
|
impl dyn PubPrincipal + PrivNonPrincipal {
|
|
|
|
|
pub fn check_doc_lint() {} // OK, no missing doc lint
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|