Skip to content

Commit 6fc45b8

Browse files
committed
Temporarily make allow-by-default the non_local_definitions lint
1 parent 1547c07 commit 6fc45b8

File tree

6 files changed

+68
-56
lines changed

6 files changed

+68
-56
lines changed

Diff for: compiler/rustc_lint/src/non_local_def.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ declare_lint! {
1414
/// ### Example
1515
///
1616
/// ```rust
17+
/// #![warn(non_local_definitions)]
1718
/// trait MyTrait {}
1819
/// struct MyStruct;
1920
///
@@ -36,7 +37,7 @@ declare_lint! {
3637
/// All nested bodies (functions, enum discriminant, array length, consts) (expect for
3738
/// `const _: Ty = { ... }` in top-level module, which is still undecided) are checked.
3839
pub NON_LOCAL_DEFINITIONS,
39-
Warn,
40+
Allow,
4041
"checks for non-local definitions",
4142
report_in_external_macro
4243
}

Diff for: tests/ui/lint/non_local_definitions.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//@ rustc-env:CARGO=/usr/bin/cargo
55

66
#![feature(inline_const)]
7+
#![warn(non_local_definitions)]
78

89
extern crate non_local_macro;
910

0 commit comments

Comments
 (0)