Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ declare_lint! {

declare_lint! {
pub PRIVATE_IN_PUBLIC,
Deny,
Warn,
"detect private items in public interfaces not caught by the old implementation"
}

Expand Down
4 changes: 4 additions & 0 deletions src/librustc_privacy/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ A private trait was used on a public type parameter bound. Erroneous code
examples:

```compile_fail,E0445
#![deny(private_in_public)]

trait Foo {
fn dummy(&self) { }
}
Expand Down Expand Up @@ -45,6 +47,8 @@ E0446: r##"
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);

Expand Down
2 changes: 2 additions & 0 deletions src/test/compile-fail/issue-28514.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// 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 {
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-30079.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(private_in_public)]
#![allow(unused)]

struct SemiPriv;
Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/private-in-public-warn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

#![feature(associated_consts)]
#![feature(associated_type_defaults)]
#![allow(dead_code)]
#![allow(unused_variables)]
#![deny(private_in_public)]
#![allow(unused)]
#![allow(improper_ctypes)]

mod types {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// 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;
Expand Down