Skip to content

Commit 5bdf79b

Browse files
authored
Auto merge of #36270 - petrochenkov:pipwarnagain, r=nikomatsakis
Make `private_in_public` compatibility lint warn-by-default again More details: https://internals.rust-lang.org/t/regression-report-stable-2016-08-16-vs-beta-2016-08-26/3930/10 r? @nikomatsakis
2 parents 5a5736d + 3be6d1f commit 5bdf79b

File tree

6 files changed

+11
-3
lines changed

6 files changed

+11
-3
lines changed

src/librustc/lint/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ declare_lint! {
114114

115115
declare_lint! {
116116
pub PRIVATE_IN_PUBLIC,
117-
Deny,
117+
Warn,
118118
"detect private items in public interfaces not caught by the old implementation"
119119
}
120120

src/librustc_privacy/diagnostics.rs

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ A private trait was used on a public type parameter bound. Erroneous code
1717
examples:
1818
1919
```compile_fail,E0445
20+
#![deny(private_in_public)]
21+
2022
trait Foo {
2123
fn dummy(&self) { }
2224
}
@@ -45,6 +47,8 @@ E0446: r##"
4547
A private type was used in a public type signature. Erroneous code example:
4648
4749
```compile_fail,E0446
50+
#![deny(private_in_public)]
51+
4852
mod Foo {
4953
struct Bar(u32);
5054

src/test/compile-fail/issue-28514.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![deny(private_in_public)]
12+
1113
pub use inner::C;
1214

1315
mod inner {

src/test/compile-fail/issue-30079.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![deny(private_in_public)]
1112
#![allow(unused)]
1213

1314
struct SemiPriv;

src/test/compile-fail/private-in-public-warn.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
#![feature(associated_consts)]
1515
#![feature(associated_type_defaults)]
16-
#![allow(dead_code)]
17-
#![allow(unused_variables)]
16+
#![deny(private_in_public)]
17+
#![allow(unused)]
1818
#![allow(improper_ctypes)]
1919

2020
mod types {

src/test/compile-fail/private-variant-and-crate-reexport.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![deny(private_in_public)]
1112
#![allow(dead_code)]
1213

1314
extern crate core;

0 commit comments

Comments
 (0)