2024-05-13 12:58:40 -05:00
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2024-06-29 05:10:33 -05:00
--> $DIR/exhaustive-trait.rs:7:5
2024-04-08 12:12:47 -05:00
|
2024-05-18 08:07:28 -05:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
2024-05-14 05:54:26 -05:00
LL | impl PartialEq<()> for Dog {
2024-05-15 12:13:02 -05:00
| ^^^^^---------^^^^^^^^^---
| | |
| | `Dog` is not local
| `PartialEq` is not local
2024-04-08 12:12:47 -05:00
|
2024-05-13 13:15:57 -05: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 12:12:47 -05: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 05:10:33 -05:00
= note: `#[warn(non_local_definitions)]` on by default
2024-04-08 12:12:47 -05:00
2024-05-13 12:58:40 -05:00
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2024-06-29 05:10:33 -05:00
--> $DIR/exhaustive-trait.rs:14:5
2024-04-08 12:12:47 -05:00
|
2024-05-18 08:07:28 -05:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-05-14 05:54:26 -05:00
LL | impl PartialEq<()> for &Dog {
2024-06-28 07:00:14 -05:00
| ^^^^^---------^^^^^^^^^^---
| | |
| | `Dog` is not local
2024-05-15 12:13:02 -05:00
| `PartialEq` is not local
2024-04-08 12:12:47 -05:00
|
2024-05-13 13:15:57 -05: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 12:12:47 -05: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 12:58:40 -05:00
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2024-06-29 05:10:33 -05:00
--> $DIR/exhaustive-trait.rs:21:5
2024-04-08 12:12:47 -05:00
|
2024-05-18 08:07:28 -05:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-05-14 05:54:26 -05:00
LL | impl PartialEq<Dog> for () {
2024-06-28 07:00:14 -05:00
| ^^^^^---------^---^^^^^^^^
| | |
| | `Dog` is not local
2024-05-15 12:13:02 -05:00
| `PartialEq` is not local
2024-04-08 12:12:47 -05:00
|
2024-05-13 13:15:57 -05: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 12:12:47 -05: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 12:58:40 -05:00
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2024-06-29 05:10:33 -05:00
--> $DIR/exhaustive-trait.rs:28:5
2024-04-08 12:12:47 -05:00
|
2024-05-18 08:07:28 -05:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-05-14 05:54:26 -05:00
LL | impl PartialEq<&Dog> for () {
2024-06-28 07:00:14 -05:00
| ^^^^^---------^^---^^^^^^^^
| | |
| | `Dog` is not local
2024-05-15 12:13:02 -05:00
| `PartialEq` is not local
2024-04-08 12:12:47 -05:00
|
2024-05-13 13:15:57 -05: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 12:12:47 -05: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 12:58:40 -05:00
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2024-06-29 05:10:33 -05:00
--> $DIR/exhaustive-trait.rs:35:5
2024-04-08 12:12:47 -05:00
|
2024-05-18 08:07:28 -05:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-05-14 05:54:26 -05:00
LL | impl PartialEq<Dog> for &Dog {
2024-06-28 07:00:14 -05:00
| ^^^^^---------^---^^^^^^^---
| | | |
| | | `Dog` is not local
| | `Dog` is not local
2024-05-15 12:13:02 -05:00
| `PartialEq` is not local
2024-04-08 12:12:47 -05:00
|
2024-05-13 13:15:57 -05: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 12:12:47 -05: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 12:58:40 -05:00
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
2024-06-29 05:10:33 -05:00
--> $DIR/exhaustive-trait.rs:42:5
2024-04-08 12:12:47 -05:00
|
2024-05-18 08:07:28 -05:00
LL | fn main() {
| --------- move the `impl` block outside of this function `main`
...
2024-05-14 05:54:26 -05:00
LL | impl PartialEq<&Dog> for &Dog {
2024-06-28 07:00:14 -05:00
| ^^^^^---------^^---^^^^^^^---
| | | |
| | | `Dog` is not local
| | `Dog` is not local
2024-05-15 12:13:02 -05:00
| `PartialEq` is not local
2024-04-08 12:12:47 -05:00
|
2024-05-13 13:15:57 -05: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 12:12:47 -05: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