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
|
|
|
|
|
|
|
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-31 00:02:40 +00:00
|
|
|
//~^ WARN private trait `PrivNonPrincipal` in public interface
|
2018-12-16 13:18:45 +00:00
|
|
|
//~| WARN this was previously accepted
|
|
|
|
|
|
|
|
#[deny(missing_docs)]
|
|
|
|
fn container() {
|
|
|
|
impl dyn PubPrincipal {
|
2020-03-22 00:47:23 +00:00
|
|
|
pub fn check_doc_lint() {} //~ ERROR missing documentation for an associated function
|
2018-12-16 13:18:45 +00:00
|
|
|
}
|
|
|
|
impl dyn PubPrincipal + PrivNonPrincipal {
|
|
|
|
pub fn check_doc_lint() {} // OK, no missing doc lint
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|