declare_lint! {
pub PRIVATE_IN_PUBLIC,
- Deny,
+ Warn,
"detect private items in public interfaces not caught by the old implementation"
}
examples:
```compile_fail,E0445
+#![deny(private_in_public)]
+
trait Foo {
fn dummy(&self) { }
}
A private type was used in a public type signature. Erroneous code example:
```compile_fail,E0446
+#![deny(private_in_public)]
+
mod Foo {
struct Bar(u32);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![deny(private_in_public)]
+
pub use inner::C;
mod inner {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![deny(private_in_public)]
#![allow(unused)]
struct SemiPriv;
#![feature(associated_consts)]
#![feature(associated_type_defaults)]
-#![allow(dead_code)]
-#![allow(unused_variables)]
+#![deny(private_in_public)]
+#![allow(unused)]
#![allow(improper_ctypes)]
mod types {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![deny(private_in_public)]
#![allow(dead_code)]
extern crate core;