Skip to content

Commit 084c829

Browse files
committed
Enable internal lints in bootstrap
1 parent 37f09cb commit 084c829

File tree

27 files changed

+7
-27
lines changed

27 files changed

+7
-27
lines changed

src/bootstrap/bin/rustc.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,13 @@ fn main() {
306306
}
307307

308308
// This is required for internal lints.
309-
cmd.arg("-Zunstable-options");
309+
if let Some(crate_name) = args.windows(2).find(|a| &*a[0] == "--crate-name") {
310+
let crate_name = crate_name[1].to_string_lossy();
311+
if crate_name.starts_with("rustc") || crate_name.starts_with("syntax") {
312+
cmd.arg("-Zunstable-options");
313+
cmd.arg("-Winternal");
314+
}
315+
}
310316

311317
// Force all crates compiled by this compiler to (a) be unstable and (b)
312318
// allow the `rustc_private` feature to link to other unstable crates

src/libarena/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
test(no_crate_inject, attr(deny(warnings))))]
1313

1414
#![deny(rust_2018_idioms)]
15-
#![deny(internal)]
1615
#![deny(unused_lifetimes)]
1716

1817
#![feature(core_intrinsics)]

src/libfmt_macros/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
test(attr(deny(warnings))))]
1010

1111
#![deny(rust_2018_idioms)]
12-
#![deny(internal)]
1312
#![deny(unused_lifetimes)]
1413

1514
#![feature(nll)]

src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/")]
3030

3131
#![deny(rust_2018_idioms)]
32-
#![deny(internal)]
3332
#![deny(unused_lifetimes)]
3433

3534
#![feature(arbitrary_self_types)]

src/librustc_allocator/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![feature(rustc_private)]
33

44
#![deny(rust_2018_idioms)]
5-
#![deny(internal)]
65
#![deny(unused_lifetimes)]
76

87
pub mod expand;

src/librustc_borrowck/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#![allow(non_camel_case_types)]
44
#![deny(rust_2018_idioms)]
5-
#![deny(internal)]
65
#![deny(unused_lifetimes)]
76

87
#![feature(in_band_lifetimes)]

src/librustc_codegen_llvm/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#![feature(static_nobundle)]
2323
#![feature(trusted_len)]
2424
#![deny(rust_2018_idioms)]
25-
#![deny(internal)]
2625
#![deny(unused_lifetimes)]
2726

2827
use back::write::{create_target_machine, create_informational_target_machine};

src/librustc_codegen_ssa/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![allow(unused_attributes)]
1414
#![allow(dead_code)]
1515
#![deny(rust_2018_idioms)]
16-
#![deny(internal)]
1716
#![deny(unused_lifetimes)]
1817

1918
#![recursion_limit="256"]

src/librustc_codegen_utils/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#![recursion_limit="256"]
1818

1919
#![deny(rust_2018_idioms)]
20-
#![deny(internal)]
2120
#![deny(unused_lifetimes)]
2221

2322
#[macro_use]

src/librustc_driver/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#![recursion_limit="256"]
1818

1919
#![deny(rust_2018_idioms)]
20-
#![deny(internal)]
2120
#![deny(unused_lifetimes)]
2221

2322
pub extern crate getopts;

0 commit comments

Comments
 (0)