240 lines
17 KiB
Plaintext
240 lines
17 KiB
Plaintext
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
|
--> $DIR/exhaustive.rs:10: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>
|
|
= note: `#[warn(non_local_definitions)]` on by default
|
|
|
|
warning: non-local `impl` definition, they should be avoided as they go against expectation
|
|
--> $DIR/exhaustive.rs:15: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 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/exhaustive.rs:22:5
|
|
|
|
|
LL | impl dyn Trait {}
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
= 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/exhaustive.rs:25:5
|
|
|
|
|
LL | impl<T: Trait> Trait 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 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/exhaustive.rs:28:5
|
|
|
|
|
LL | impl Trait for &dyn Trait {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= 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/exhaustive.rs:31:5
|
|
|
|
|
LL | impl Trait 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 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/exhaustive.rs:34:5
|
|
|
|
|
LL | impl Trait 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 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/exhaustive.rs:37:5
|
|
|
|
|
LL | impl Trait 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 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/exhaustive.rs:40:5
|
|
|
|
|
LL | impl Trait 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 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/exhaustive.rs:43:5
|
|
|
|
|
LL | impl Trait 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 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/exhaustive.rs:46:5
|
|
|
|
|
LL | impl Trait 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 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/exhaustive.rs:50:9
|
|
|
|
|
LL | impl Trait 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/exhaustive.rs:58:5
|
|
|
|
|
LL | impl Trait 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 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/exhaustive.rs:60:5
|
|
|
|
|
LL | impl Trait 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 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/exhaustive.rs:62:5
|
|
|
|
|
LL | impl Trait 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 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/exhaustive.rs:64:5
|
|
|
|
|
LL | impl Trait 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 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/exhaustive.rs:66:5
|
|
|
|
|
LL | impl Trait 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 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/exhaustive.rs:68:5
|
|
|
|
|
LL | impl Trait 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 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/exhaustive.rs:72: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 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/exhaustive.rs:79:9
|
|
|
|
|
LL | / impl InsideMain {
|
|
LL | |
|
|
LL | | fn bar() {}
|
|
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 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: 20 warnings emitted
|
|
|