Skip to content

Commit a08cfc4

Browse files
committed
Add rust_2018_idioms lint group
1 parent 6679732 commit a08cfc4

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Diff for: src/librustc_lint/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnionsWithDropFields {
12631263
pub struct UnreachablePub;
12641264

12651265
declare_lint! {
1266-
UNREACHABLE_PUB,
1266+
pub UNREACHABLE_PUB,
12671267
Allow,
12681268
"`pub` items not reachable from crate root"
12691269
}

Diff for: src/librustc_lint/lib.rs

+6
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ extern crate rustc_mir;
4343
extern crate syntax_pos;
4444

4545
use rustc::lint;
46+
use rustc::lint::builtin::BARE_TRAIT_OBJECT;
4647
use rustc::session;
4748
use rustc::util;
4849

@@ -177,6 +178,11 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
177178
UNUSED_FEATURES,
178179
UNUSED_PARENS);
179180

181+
add_lint_group!(sess,
182+
"rust_2018_idioms",
183+
BARE_TRAIT_OBJECT,
184+
UNREACHABLE_PUB);
185+
180186
// Guidelines for creating a future incompatibility lint:
181187
//
182188
// - Create a lint defaulting to warn as normal, with ideally the same error

Diff for: src/test/ui/inference-variable-behind-raw-pointer.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ LL | if data.is_null() {}
55
| ^^^^^^^
66
|
77
= note: #[warn(tyvar_behind_raw_pointer)] on by default
8-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 epoch!
99
= note: for more information, see issue #46906 <https://github.com/rust-lang/rust/issues/46906>
1010

0 commit comments

Comments
 (0)