1
Fork 0

Temporarily make allow-by-default the non_local_definitions lint

This commit is contained in:
Urgau 2024-03-06 21:05:19 +01:00
parent 1547c076bf
commit 6fc45b84ac
6 changed files with 68 additions and 56 deletions

View file

@ -14,6 +14,7 @@ declare_lint! {
/// ### Example
///
/// ```rust
/// #![warn(non_local_definitions)]
/// trait MyTrait {}
/// struct MyStruct;
///
@ -36,7 +37,7 @@ declare_lint! {
/// All nested bodies (functions, enum discriminant, array length, consts) (expect for
/// `const _: Ty = { ... }` in top-level module, which is still undecided) are checked.
pub NON_LOCAL_DEFINITIONS,
Warn,
Allow,
"checks for non-local definitions",
report_in_external_macro
}