mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
104 lines
6.7 KiB
Plaintext
104 lines
6.7 KiB
Plaintext
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
|
--> $DIR/consts.rs:13:5
|
|
|
|
|
LL | const Z: () = {
|
|
| - help: use a const-anon item to suppress this lint: `_`
|
|
...
|
|
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 may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
|
|
= 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/consts.rs:24: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 may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
|
|
= 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/consts.rs:32: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 may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
|
|
= 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/consts.rs:43: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 may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
|
|
= 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/consts.rs:50: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 may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
|
|
= 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/consts.rs:59: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 may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
|
|
= 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/consts.rs:72:9
|
|
|
|
|
LL | impl Uto9 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 may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
|
|
= 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/consts.rs:79:9
|
|
|
|
|
LL | impl Uto10 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 may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
|
|
= 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: 8 warnings emitted
|
|
|