]> git.lizzy.rs Git - rust.git/blobdiff - src/lib.rs
Merge pull request #3288 from devonhollowood/pedantic-dogfood-casts
[rust.git] / src / lib.rs
index 1123c968006ab82f70d370a5aecd55747f0d23e7..58158f92e65bd189bc1b0f3c72539ab3c30e866c 100644 (file)
@@ -1,13 +1,26 @@
+// Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+
 // error-pattern:cargo-clippy
 #![feature(plugin_registrar)]
-#![feature(rust_2018_preview)]
 #![feature(rustc_private)]
-#![feature(macro_vis_matcher)]
+#![feature(tool_lints)]
 #![allow(unknown_lints)]
-#![allow(missing_docs_in_private_items)]
+#![allow(clippy::missing_docs_in_private_items)]
 #![warn(rust_2018_idioms)]
 
-use rustc_plugin::Registry;
+// FIXME: switch to something more ergonomic here, once available.
+// (currently there is no way to opt into sysroot crates w/o `extern crate`)
+#[allow(unused_extern_crates)]
+extern crate rustc_plugin;
+use self::rustc_plugin::Registry;
 
 #[plugin_registrar]
 pub fn plugin_registrar(reg: &mut Registry<'_>) {
@@ -25,7 +38,8 @@ pub fn plugin_registrar(reg: &mut Registry<'_>) {
         }
     });
 
-    clippy_lints::register_plugins(reg);
+    let conf = clippy_lints::read_conf(reg);
+    clippy_lints::register_plugins(reg, &conf);
 }
 
 // only exists to let the dogfood integration test works.