2024-05-13 19:58:40 +02:00
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2024-06-29 12:10:33 +02:00
--> $DIR/weird-exprs.rs:8:5
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | type A = [u32; {
| ________________-
LL | | impl Uto for *mut Test {}
2024-06-28 14:00:14 +02:00
| | ^^^^^---^^^^^^^^^^----
| | | |
| | | `Test` is not local
2024-05-18 15:07:28 +02:00
| | `Uto` is not local
LL | |
... |
LL | | }];
| |_- move the `impl` block outside of this constant expression `<unnameable>`
2024-04-08 19:12:47 +02:00
|
2024-05-13 20:15:57 +02:00
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
2024-04-08 19:12:47 +02:00
= 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>
2024-06-29 12:10:33 +02:00
= note: `#[warn(non_local_definitions)]` on by default
2024-04-08 19:12:47 +02:00
2024-05-13 19:58:40 +02:00
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2024-06-29 12:10:33 +02:00
--> $DIR/weird-exprs.rs:16:9
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | Discr = {
| _____________-
LL | | impl Uto for Test {}
| | ^^^^^---^^^^^----
| | | |
| | | `Test` is not local
| | `Uto` is not local
LL | |
... |
LL | | }
| |_____- move the `impl` block outside of this constant expression `<unnameable>`
2024-04-08 19:12:47 +02:00
|
2024-05-13 20:15:57 +02:00
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
2024-04-08 19:12:47 +02:00
= 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>
2024-05-13 19:58:40 +02:00
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2024-06-29 12:10:33 +02:00
--> $DIR/weird-exprs.rs:25:9
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | let _array = [0i32; {
| _________________________-
LL | | impl Test {
| | ^^^^^----
| | |
| | `Test` is not local
2024-05-14 12:41:27 +02:00
LL | |
LL | | fn bar() {}
2024-05-18 15:07:28 +02:00
... |
LL | | 1
LL | | }];
| |_____- move the `impl` block outside of this constant expression `<unnameable>` and up 2 bodies
|
2024-06-28 14:28:50 +02:00
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
2024-04-08 19:12:47 +02:00
= 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>
2024-05-13 19:58:40 +02:00
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2024-06-29 12:10:33 +02:00
--> $DIR/weird-exprs.rs:34:9
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | type A = [u32; {
| ____________________-
LL | | impl Uto for &Test {}
2024-06-28 14:00:14 +02:00
| | ^^^^^---^^^^^^----
| | | |
| | | `Test` is not local
2024-05-18 15:07:28 +02:00
| | `Uto` is not local
LL | |
... |
LL | | }];
| |_____- move the `impl` block outside of this constant expression `<unnameable>` and up 2 bodies
2024-04-08 19:12:47 +02:00
|
2024-05-13 20:15:57 +02:00
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
2024-04-08 19:12:47 +02:00
= 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>
2024-05-13 19:58:40 +02:00
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2024-06-29 12:10:33 +02:00
--> $DIR/weird-exprs.rs:41:9
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn a(_: [u32; {
| ___________________-
LL | | impl Uto for &(Test,) {}
2024-06-28 14:00:14 +02:00
| | ^^^^^---^^^^^^^----^^
| | | |
| | | `Test` is not local
2024-05-18 15:07:28 +02:00
| | `Uto` is not local
LL | |
... |
LL | | }]) {}
| |_____- move the `impl` block outside of this constant expression `<unnameable>` and up 2 bodies
2024-04-08 19:12:47 +02:00
|
2024-05-13 20:15:57 +02:00
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
2024-04-08 19:12:47 +02:00
= 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>
2024-05-13 19:58:40 +02:00
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2024-06-29 12:10:33 +02:00
--> $DIR/weird-exprs.rs:48:9
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn b() -> [u32; {
| _____________________-
LL | | impl Uto for &(Test,Test) {}
2024-06-28 14:00:14 +02:00
| | ^^^^^---^^^^^^^----^----^
| | | | |
| | | | `Test` is not local
| | | `Test` is not local
2024-05-18 15:07:28 +02:00
| | `Uto` is not local
LL | |
... |
LL | | }] { todo!() }
| |_____- move the `impl` block outside of this constant expression `<unnameable>` and up 2 bodies
2024-04-08 19:12:47 +02:00
|
2024-05-13 20:15:57 +02:00
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
2024-04-08 19:12:47 +02:00
= 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: 6 warnings emitted