Skip to content

Commit db45609

Browse files
committed
Use lints in Clippy that are enabled in rustc bootstrap
1 parent 7427065 commit db45609

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

clippy_lints/src/lib.rs

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
// error-pattern:cargo-clippy
22

33
#![feature(bindings_after_at)]
4-
#![feature(box_syntax)]
54
#![feature(box_patterns)]
5+
#![feature(box_syntax)]
6+
#![feature(concat_idents)]
7+
#![feature(crate_visibility_modifier)]
8+
#![feature(drain_filter)]
69
#![feature(or_patterns)]
710
#![feature(rustc_private)]
811
#![feature(stmt_expr_attributes)]
9-
#![allow(clippy::missing_docs_in_private_items, clippy::must_use_candidate)]
1012
#![recursion_limit = "512"]
11-
#![warn(rust_2018_idioms, trivial_casts, trivial_numeric_casts)]
12-
#![deny(rustc::internal)]
1313
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
14-
#![feature(crate_visibility_modifier)]
15-
#![feature(concat_idents)]
16-
#![feature(drain_filter)]
14+
#![allow(clippy::missing_docs_in_private_items, clippy::must_use_candidate)]
15+
#![warn(trivial_casts, trivial_numeric_casts)]
16+
// warn on lints, that are included in `rust-lang/rust`s bootstrap
17+
#![warn(rust_2018_idioms, unused_lifetimes)]
18+
// warn on rustc internal lints
19+
#![deny(rustc::internal)]
1720

1821
// FIXME: switch to something more ergonomic here, once available.
1922
// (Currently there is no way to opt into sysroot crates without `extern crate`.)

src/driver.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
21
#![feature(rustc_private)]
2+
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
3+
// warn on lints, that are included in `rust-lang/rust`s bootstrap
4+
#![warn(rust_2018_idioms, unused_lifetimes)]
5+
// warn on rustc internal lints
6+
#![deny(rustc::internal)]
37

48
// FIXME: switch to something more ergonomic here, once available.
59
// (Currently there is no way to opt into sysroot crates without `extern crate`.)

src/main.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
2+
// warn on lints, that are included in `rust-lang/rust`s bootstrap
3+
#![warn(rust_2018_idioms, unused_lifetimes)]
24

35
use rustc_tools_util::VersionInfo;
46
use std::env;

0 commit comments

Comments
 (0)