From 9b2bf7085133f916219a357c78c7b8c75a3269ba Mon Sep 17 00:00:00 2001 From: flip1995 Date: Sat, 16 Mar 2019 14:59:34 +0100 Subject: [PATCH] Make internal lints allow-by-default --- src/librustc/lint/internal.rs | 4 ++-- src/librustc_interface/util.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/librustc/lint/internal.rs b/src/librustc/lint/internal.rs index 8314bf7ae9d..7d820764549 100644 --- a/src/librustc/lint/internal.rs +++ b/src/librustc/lint/internal.rs @@ -11,7 +11,7 @@ use syntax::ast::Ident; declare_lint! { pub DEFAULT_HASH_TYPES, - Warn, + Allow, "forbid HashMap and HashSet and suggest the FxHash* variants" } @@ -64,7 +64,7 @@ impl EarlyLintPass for DefaultHashTypes { declare_lint! { pub USAGE_OF_TY_TYKIND, - Warn, + Allow, "Usage of `ty::TyKind` outside of the `ty::sty` module" } diff --git a/src/librustc_interface/util.rs b/src/librustc_interface/util.rs index 6e4f2bf24e3..f6e25d2c4db 100644 --- a/src/librustc_interface/util.rs +++ b/src/librustc_interface/util.rs @@ -109,6 +109,7 @@ pub fn create_session( let codegen_backend = get_codegen_backend(&sess); rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess)); + rustc_lint::register_internals(&mut sess.lint_store.borrow_mut(), Some(&sess)); let mut cfg = config::build_configuration(&sess, config::to_crate_config(cfg)); add_configuration(&mut cfg, &sess, &*codegen_backend);