|
1 | | -#![cfg_attr(feature = "deny-warnings", deny(warnings))] |
2 | 1 | #![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)] |
3 | 7 |
|
4 | 8 | // FIXME: switch to something more ergonomic here, once available. |
5 | 9 | // (Currently there is no way to opt into sysroot crates without `extern crate`.) |
6 | 10 | #[allow(unused_extern_crates)] |
| 11 | +extern crate rustc_data_structures; |
| 12 | +#[allow(unused_extern_crates)] |
7 | 13 | extern crate rustc_driver; |
8 | 14 | #[allow(unused_extern_crates)] |
9 | 15 | extern crate rustc_errors; |
@@ -93,7 +99,7 @@ impl rustc_driver::Callbacks for ClippyCallbacks { |
93 | 99 | #[allow(clippy::find_map, clippy::filter_map)] |
94 | 100 | fn describe_lints() { |
95 | 101 | use lintlist::{Level, Lint, ALL_LINTS, LINT_LEVELS}; |
96 | | - use std::collections::HashSet; |
| 102 | + use rustc_data_structures::fx::FxHashSet; |
97 | 103 |
|
98 | 104 | println!( |
99 | 105 | " |
@@ -137,7 +143,7 @@ Available lint options: |
137 | 143 |
|
138 | 144 | let scoped = |x: &str| format!("clippy::{}", x); |
139 | 145 |
|
140 | | - let lint_groups: HashSet<_> = lints.iter().map(|lint| lint.group).collect(); |
| 146 | + let lint_groups: FxHashSet<_> = lints.iter().map(|lint| lint.group).collect(); |
141 | 147 |
|
142 | 148 | println!("Lint checks provided by clippy:\n"); |
143 | 149 | println!(" {} {:7.7} meaning", padded("name"), "default"); |
|
0 commit comments