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/exhaustive.rs:10:5
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
2024-05-14 12:54:26 +02:00
LL | impl Test {
2024-05-15 19:13:02 +02:00
| ^^^^^----
| |
| `Test` is not local
2024-04-08 19:12:47 +02:00
|
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-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/exhaustive.rs:15:5
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-05-14 12:54:26 +02:00
LL | impl Display for Test {
2024-05-15 19:13:02 +02:00
| ^^^^^-------^^^^^----
| | |
| | `Test` is not local
| `Display` is not local
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/exhaustive.rs:22:5
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-04-08 19:12:47 +02:00
LL | impl dyn Trait {}
2024-05-15 19:13:02 +02:00
| ^^^^^^^^^-----
| |
| `Trait` is not local
2024-04-08 19:12:47 +02:00
|
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/exhaustive.rs:25:5
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-04-08 19:12:47 +02:00
LL | impl<T: Trait> Trait for Vec<T> { }
2024-05-15 19:13:02 +02:00
| ^^^^^^^^^^^^^^^-----^^^^^---^^^
| | |
| | `Vec` is not local
| `Trait` is not local
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/exhaustive.rs:28:5
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-04-08 19:12:47 +02:00
LL | impl Trait for &dyn Trait {}
2024-06-28 14:00:14 +02:00
| ^^^^^-----^^^^^^^^^^-----
| | |
| | `Trait` is not local
2024-05-15 19:13:02 +02:00
| `Trait` is not local
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/exhaustive.rs:31:5
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-04-08 19:12:47 +02:00
LL | impl Trait for *mut Test {}
2024-06-28 14:00:14 +02:00
| ^^^^^-----^^^^^^^^^^----
| | |
| | `Test` is not local
2024-05-15 19:13:02 +02:00
| `Trait` is not local
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/exhaustive.rs:34:5
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-04-08 19:12:47 +02:00
LL | impl Trait for *mut [Test] {}
2024-06-28 14:00:14 +02:00
| ^^^^^-----^^^^^^^^^^^----^
| | |
| | `Test` is not local
2024-05-15 19:13:02 +02:00
| `Trait` is not local
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/exhaustive.rs:37:5
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-04-08 19:12:47 +02:00
LL | impl Trait for [Test; 8] {}
2024-06-28 14:00:14 +02:00
| ^^^^^-----^^^^^^----^^^^
| | |
| | `Test` is not local
2024-05-15 19:13:02 +02:00
| `Trait` is not local
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/exhaustive.rs:40:5
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-04-08 19:12:47 +02:00
LL | impl Trait for (Test,) {}
2024-06-28 14:00:14 +02:00
| ^^^^^-----^^^^^^----^^
| | |
| | `Test` is not local
2024-05-15 19:13:02 +02:00
| `Trait` is not local
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/exhaustive.rs:43:5
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-04-08 19:12:47 +02:00
LL | impl Trait for fn(Test) -> () {}
2024-06-28 14:00:14 +02:00
| ^^^^^-----^^^^^^^^----^^^^^^^
| | |
| | `Test` is not local
2024-05-15 19:13:02 +02:00
| `Trait` is not local
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/exhaustive.rs:46:5
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-04-08 19:12:47 +02:00
LL | impl Trait for fn() -> Test {}
2024-06-28 14:00:14 +02:00
| ^^^^^-----^^^^^^^^^^^^^----
| | |
| | `Test` is not local
2024-05-15 19:13:02 +02:00
| `Trait` is not local
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/exhaustive.rs:50:9
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | let _a = || {
| -- move the `impl` block outside of this closure `<unnameable>` and up 2 bodies
2024-04-08 19:12:47 +02:00
LL | impl Trait for Test {}
2024-05-15 19:13:02 +02:00
| ^^^^^-----^^^^^----
| | |
| | `Test` is not local
| `Trait` is not local
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-07-09 18:33:37 +02:00
--> $DIR/exhaustive.rs:67:9
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn inside_inside() {
| ------------------ move the `impl` block outside of this function `inside_inside` and up 2 bodies
2024-05-14 12:54:26 +02:00
LL | impl Display for InsideMain {
2024-05-15 19:13:02 +02:00
| ^^^^^-------^^^^^----------
| | |
| | `InsideMain` is not local
| `Display` is not local
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-07-09 18:33:37 +02:00
--> $DIR/exhaustive.rs:74:9
2024-04-08 19:12:47 +02:00
|
2024-05-18 15:07:28 +02:00
LL | fn inside_inside() {
| ------------------ move the `impl` block outside of this function `inside_inside` and up 2 bodies
...
2024-05-14 12:54:26 +02:00
LL | impl InsideMain {
2024-05-15 19:13:02 +02:00
| ^^^^^----------
| |
| `InsideMain` is not local
2024-04-08 19:12:47 +02:00
|
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-07-09 18:33:37 +02:00
warning: 14 warnings emitted
2024-04-08 19:12:47 +02:00