Skip to content

Commit 2f2d5cc

Browse files
committed
Put non_local_definitions lint back to warn-by-default
1 parent 8edf255 commit 2f2d5cc

File tree

3 files changed

+57
-62
lines changed

3 files changed

+57
-62
lines changed

compiler/rustc_lint/src/non_local_def.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ declare_lint! {
4747
/// All nested bodies (functions, enum discriminant, array length, consts) (expect for
4848
/// `const _: Ty = { ... }` in top-level module, which is still undecided) are checked.
4949
pub NON_LOCAL_DEFINITIONS,
50-
Allow,
50+
Warn,
5151
"checks for non-local definitions",
5252
report_in_external_macro
5353
}

tests/ui/lint/non_local_definitions.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//@ rustc-env:CARGO_CRATE_NAME=non_local_def
55

66
#![feature(inline_const)]
7-
#![warn(non_local_definitions)]
87

98
extern crate non_local_macro;
109

0 commit comments

Comments
 (0)