blob: e348a181651cf10db9ea9797800a5a944f39c0ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#![feature(auto_traits)]
#![feature(negative_impls)]
pub trait PubPrincipal {}
auto trait PrivNonPrincipal {}
pub fn leak_dyn_nonprincipal() -> Box<dyn PubPrincipal + PrivNonPrincipal> { loop {} }
//~^ WARN trait `PrivNonPrincipal` is more private than the item `leak_dyn_nonprincipal`
#[deny(missing_docs)]
fn container() {
impl dyn PubPrincipal {
pub fn check_doc_lint() {} //~ ERROR missing documentation for an associated function
}
impl dyn PubPrincipal + PrivNonPrincipal {
pub fn check_doc_lint() {} // OK, no missing doc lint
}
}
fn main() {}
|