612 lines
38 KiB
Plaintext
612 lines
38 KiB
Plaintext
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:32:5
|
||
|
|
|
||
|
LL | impl Uto for &Test {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current constant `Z`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
= note: `#[warn(non_local_definitions)]` on by default
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:42:5
|
||
|
|
|
||
|
LL | impl Uto for *mut Test {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current constant expression `<unnameable>`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:50:9
|
||
|
|
|
||
|
LL | impl Uto for Test {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current constant expression `<unnameable>`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:59:5
|
||
|
|
|
||
|
LL | impl Uto2 for Test {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current static `A`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:67:5
|
||
|
|
|
||
|
LL | impl Uto3 for Test {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current constant `B`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `macro_rules!` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:71:5
|
||
|
|
|
||
|
LL | macro_rules! m0 { () => { } };
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: remove the `#[macro_export]` or move this `macro_rules!` outside the of the current constant `B`
|
||
|
= note: a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `macro_rules!` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:83:5
|
||
|
|
|
||
|
LL | macro_rules! m { () => { } };
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: remove the `#[macro_export]` or move this `macro_rules!` outside the of the current function `main`
|
||
|
= note: a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:86:5
|
||
|
|
|
||
|
LL | / impl Test {
|
||
|
LL | |
|
||
|
LL | | fn foo() {}
|
||
|
LL | | }
|
||
|
| |_____^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:92:9
|
||
|
|
|
||
|
LL | / impl Test {
|
||
|
LL | |
|
||
|
LL | | fn bar() {}
|
||
|
LL | | }
|
||
|
| |_________^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current constant expression `<unnameable>` and up 2 bodies
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:101:9
|
||
|
|
|
||
|
LL | / impl Test {
|
||
|
LL | |
|
||
|
LL | | fn hoo() {}
|
||
|
LL | | }
|
||
|
| |_________^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current inline constant `<unnameable>` and up 2 bodies
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:110:9
|
||
|
|
|
||
|
LL | / impl Test {
|
||
|
LL | |
|
||
|
LL | | fn foo2() {}
|
||
|
LL | | }
|
||
|
| |_________^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current constant `_` and up 2 bodies
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:118:5
|
||
|
|
|
||
|
LL | / impl Display for Test {
|
||
|
LL | |
|
||
|
LL | | fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||
|
LL | | todo!()
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_____^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:125:5
|
||
|
|
|
||
|
LL | impl dyn Uto5 {}
|
||
|
| ^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:128:5
|
||
|
|
|
||
|
LL | impl<T: Uto5> Uto5 for Vec<T> { }
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:131:5
|
||
|
|
|
||
|
LL | impl Uto5 for &dyn Uto5 {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:134:5
|
||
|
|
|
||
|
LL | impl Uto5 for *mut Test {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:137:5
|
||
|
|
|
||
|
LL | impl Uto5 for *mut [Test] {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:140:5
|
||
|
|
|
||
|
LL | impl Uto5 for [Test; 8] {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:143:5
|
||
|
|
|
||
|
LL | impl Uto5 for (Test,) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:146:5
|
||
|
|
|
||
|
LL | impl Uto5 for fn(Test) -> () {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:149:5
|
||
|
|
|
||
|
LL | impl Uto5 for fn() -> Test {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:153:9
|
||
|
|
|
||
|
LL | impl Uto5 for Test {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current closure `<unnameable>` and up 2 bodies
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:160:9
|
||
|
|
|
||
|
LL | impl Uto5 for &Test {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current constant expression `<unnameable>` and up 2 bodies
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:167:9
|
||
|
|
|
||
|
LL | impl Uto5 for &(Test,) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current constant expression `<unnameable>` and up 2 bodies
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:174:9
|
||
|
|
|
||
|
LL | impl Uto5 for &(Test,Test) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current constant expression `<unnameable>` and up 2 bodies
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:182:5
|
||
|
|
|
||
|
LL | impl Uto5 for *mut InsideMain {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:184:5
|
||
|
|
|
||
|
LL | impl Uto5 for *mut [InsideMain] {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:186:5
|
||
|
|
|
||
|
LL | impl Uto5 for [InsideMain; 8] {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:188:5
|
||
|
|
|
||
|
LL | impl Uto5 for (InsideMain,) {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:190:5
|
||
|
|
|
||
|
LL | impl Uto5 for fn(InsideMain) -> () {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:192:5
|
||
|
|
|
||
|
LL | impl Uto5 for fn() -> InsideMain {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:206:9
|
||
|
|
|
||
|
LL | / impl Display for InsideMain {
|
||
|
LL | |
|
||
|
LL | | fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||
|
LL | | todo!()
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_________^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `inside_inside` and up 2 bodies
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:213:9
|
||
|
|
|
||
|
LL | / impl InsideMain {
|
||
|
LL | |
|
||
|
LL | | fn bar() {
|
||
|
LL | | #[macro_export]
|
||
|
... |
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_________^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `inside_inside` and up 2 bodies
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `macro_rules!` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:217:17
|
||
|
|
|
||
|
LL | macro_rules! m2 { () => { } };
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: remove the `#[macro_export]` or move this `macro_rules!` outside the of the current associated function `bar` and up 3 bodies
|
||
|
= note: a `macro_rules!` definition is non-local if it is nested inside an item and has a `#[macro_export]` attribute
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:227:5
|
||
|
|
|
||
|
LL | impl<T: Uto6> Uto3 for Vec<T> { }
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `main`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:236:5
|
||
|
|
|
||
|
LL | impl Uto7 for Test where Local: std::any::Any {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `bad`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:239:5
|
||
|
|
|
||
|
LL | impl<T> Uto8 for T {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `bad`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:248:5
|
||
|
|
|
||
|
LL | / impl Default for UwU<OwO> {
|
||
|
LL | |
|
||
|
LL | | fn default() -> Self {
|
||
|
LL | | UwU(OwO)
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_____^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `fun`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:259:5
|
||
|
|
|
||
|
LL | / impl From<Cat> for () {
|
||
|
LL | |
|
||
|
LL | | fn from(_: Cat) -> () {
|
||
|
LL | | todo!()
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_____^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `meow`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:268:5
|
||
|
|
|
||
|
LL | / impl AsRef<Cat> for () {
|
||
|
LL | |
|
||
|
LL | | fn as_ref(&self) -> &Cat { &Cat }
|
||
|
LL | | }
|
||
|
| |_____^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `meow`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:279:5
|
||
|
|
|
||
|
LL | / impl PartialEq<B> for G {
|
||
|
LL | |
|
||
|
LL | | fn eq(&self, _: &B) -> bool {
|
||
|
LL | | true
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_____^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `fun2`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:296:5
|
||
|
|
|
||
|
LL | / impl PartialEq<Dog> for &Dog {
|
||
|
LL | |
|
||
|
LL | | fn eq(&self, _: &Dog) -> bool {
|
||
|
LL | | todo!()
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_____^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `woof`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:303:5
|
||
|
|
|
||
|
LL | / impl PartialEq<()> for Dog {
|
||
|
LL | |
|
||
|
LL | | fn eq(&self, _: &()) -> bool {
|
||
|
LL | | todo!()
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_____^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `woof`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:310:5
|
||
|
|
|
||
|
LL | / impl PartialEq<()> for &Dog {
|
||
|
LL | |
|
||
|
LL | | fn eq(&self, _: &()) -> bool {
|
||
|
LL | | todo!()
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_____^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `woof`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:317:5
|
||
|
|
|
||
|
LL | / impl PartialEq<Dog> for () {
|
||
|
LL | |
|
||
|
LL | | fn eq(&self, _: &Dog) -> bool {
|
||
|
LL | | todo!()
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_____^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `woof`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:339:5
|
||
|
|
|
||
|
LL | / impl From<Wrap<Wrap<Lion>>> for () {
|
||
|
LL | |
|
||
|
LL | | fn from(_: Wrap<Wrap<Lion>>) -> Self {
|
||
|
LL | | todo!()
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_____^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `rawr`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:346:5
|
||
|
|
|
||
|
LL | / impl From<()> for Wrap<Lion> {
|
||
|
LL | |
|
||
|
LL | | fn from(_: ()) -> Self {
|
||
|
LL | | todo!()
|
||
|
LL | | }
|
||
|
LL | | }
|
||
|
| |_____^
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `rawr`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
|
||
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
||
|
--> $DIR/non_local_definitions.rs:359:13
|
||
|
|
|
||
|
LL | impl MacroTrait for OutsideStruct {}
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
...
|
||
|
LL | m!();
|
||
|
| ---- in this macro invocation
|
||
|
|
|
||
|
= help: move this `impl` block outside the of the current function `my_func`
|
||
|
= note: an `impl` definition is non-local if it is nested inside an item and neither the type nor the trait are at the same nesting level as the `impl` block
|
||
|
= note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
|
||
|
= note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
|
||
|
= note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||
|
|
||
|
warning: 48 warnings emitted
|
||
|
|