You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/lint/non-local-defs/consts.stderr
+3-3
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,9 @@ LL | const Z: () = {
8
8
| move the `impl` block outside of this constant `Z`
9
9
...
10
10
LL | impl Uto for &Test {}
11
-
| ^^^^^---^^^^^-----
12
-
| | |
13
-
| | `&'_ Test` is not local
11
+
| ^^^^^---^^^^^^----
12
+
| | |
13
+
| | `Test` is not local
14
14
| `Uto` is not local
15
15
|
16
16
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
Copy file name to clipboardExpand all lines: tests/ui/lint/non-local-defs/exhaustive-trait.stderr
+17-15
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,9 @@ LL | fn main() {
21
21
| --------- move the `impl` block outside of this function `main`
22
22
...
23
23
LL | impl PartialEq<()> for &Dog {
24
-
| ^^^^^---------^^^^^^^^^----
25
-
| | |
26
-
| | `&'_ Dog` is not local
24
+
| ^^^^^---------^^^^^^^^^^---
25
+
| | |
26
+
| | `Dog` is not local
27
27
| `PartialEq` is not local
28
28
|
29
29
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
@@ -37,9 +37,9 @@ LL | fn main() {
37
37
| --------- move the `impl` block outside of this function `main`
38
38
...
39
39
LL | impl PartialEq<Dog> for () {
40
-
| ^^^^^---------^^^^^^^^^^--
41
-
| | |
42
-
| | `()` is not local
40
+
| ^^^^^---------^---^^^^^^^^
41
+
| | |
42
+
| | `Dog` is not local
43
43
| `PartialEq` is not local
44
44
|
45
45
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
@@ -53,9 +53,9 @@ LL | fn main() {
53
53
| --------- move the `impl` block outside of this function `main`
54
54
...
55
55
LL | impl PartialEq<&Dog> for () {
56
-
| ^^^^^---------^^^^^^^^^^^--
57
-
| | |
58
-
| | `()` is not local
56
+
| ^^^^^---------^^---^^^^^^^^
57
+
| | |
58
+
| | `Dog` is not local
59
59
| `PartialEq` is not local
60
60
|
61
61
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
@@ -69,9 +69,10 @@ LL | fn main() {
69
69
| --------- move the `impl` block outside of this function `main`
70
70
...
71
71
LL | impl PartialEq<Dog> for &Dog {
72
-
| ^^^^^---------^^^^^^^^^^----
73
-
| | |
74
-
| | `&'_ Dog` is not local
72
+
| ^^^^^---------^---^^^^^^^---
73
+
| | | |
74
+
| | | `Dog` is not local
75
+
| | `Dog` is not local
75
76
| `PartialEq` is not local
76
77
|
77
78
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
@@ -85,9 +86,10 @@ LL | fn main() {
85
86
| --------- move the `impl` block outside of this function `main`
86
87
...
87
88
LL | impl PartialEq<&Dog> for &Dog {
88
-
| ^^^^^---------^^^^^^^^^^^----
89
-
| | |
90
-
| | `&'_ Dog` is not local
89
+
| ^^^^^---------^^---^^^^^^^---
90
+
| | | |
91
+
| | | `Dog` is not local
92
+
| | `Dog` is not local
91
93
| `PartialEq` is not local
92
94
|
93
95
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
Copy file name to clipboardExpand all lines: tests/ui/lint/non-local-defs/exhaustive.stderr
+21-21
Original file line number
Diff line number
Diff line change
@@ -65,9 +65,9 @@ LL | fn main() {
65
65
| --------- move the `impl` block outside of this function `main`
66
66
...
67
67
LL | impl Trait for &dyn Trait {}
68
-
| ^^^^^-----^^^^^----------
69
-
| | |
70
-
| | `&'_ dyn Trait` is not local
68
+
| ^^^^^-----^^^^^^^^^^-----
69
+
| | |
70
+
| | `Trait` is not local
71
71
| `Trait` is not local
72
72
|
73
73
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
@@ -81,9 +81,9 @@ LL | fn main() {
81
81
| --------- move the `impl` block outside of this function `main`
82
82
...
83
83
LL | impl Trait for *mut Test {}
84
-
| ^^^^^-----^^^^^---------
85
-
| | |
86
-
| | `*mut Test` is not local
84
+
| ^^^^^-----^^^^^^^^^^----
85
+
| | |
86
+
| | `Test` is not local
87
87
| `Trait` is not local
88
88
|
89
89
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
@@ -97,9 +97,9 @@ LL | fn main() {
97
97
| --------- move the `impl` block outside of this function `main`
98
98
...
99
99
LL | impl Trait for *mut [Test] {}
100
-
| ^^^^^-----^^^^^-----------
101
-
| | |
102
-
| | `*mut [Test]` is not local
100
+
| ^^^^^-----^^^^^^^^^^^----^
101
+
| | |
102
+
| | `Test` is not local
103
103
| `Trait` is not local
104
104
|
105
105
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
@@ -113,9 +113,9 @@ LL | fn main() {
113
113
| --------- move the `impl` block outside of this function `main`
114
114
...
115
115
LL | impl Trait for [Test; 8] {}
116
-
| ^^^^^-----^^^^^---------
117
-
| | |
118
-
| | `[Test; 8]` is not local
116
+
| ^^^^^-----^^^^^^----^^^^
117
+
| | |
118
+
| | `Test` is not local
119
119
| `Trait` is not local
120
120
|
121
121
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
@@ -129,9 +129,9 @@ LL | fn main() {
129
129
| --------- move the `impl` block outside of this function `main`
130
130
...
131
131
LL | impl Trait for (Test,) {}
132
-
| ^^^^^-----^^^^^-------
133
-
| | |
134
-
| | `(Test,)` is not local
132
+
| ^^^^^-----^^^^^^----^^
133
+
| | |
134
+
| | `Test` is not local
135
135
| `Trait` is not local
136
136
|
137
137
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
@@ -145,9 +145,9 @@ LL | fn main() {
145
145
| --------- move the `impl` block outside of this function `main`
146
146
...
147
147
LL | impl Trait for fn(Test) -> () {}
148
-
| ^^^^^-----^^^^^--------------
149
-
| | |
150
-
| | `fn(: Test) -> ()` is not local
148
+
| ^^^^^-----^^^^^^^^----^^^^^^^
149
+
| | |
150
+
| | `Test` is not local
151
151
| `Trait` is not local
152
152
|
153
153
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
@@ -161,9 +161,9 @@ LL | fn main() {
161
161
| --------- move the `impl` block outside of this function `main`
162
162
...
163
163
LL | impl Trait for fn() -> Test {}
164
-
| ^^^^^-----^^^^^------------
165
-
| | |
166
-
| | `fn() -> Test` is not local
164
+
| ^^^^^-----^^^^^^^^^^^^^----
165
+
| | |
166
+
| | `Test` is not local
167
167
| `Trait` is not local
168
168
|
169
169
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
Copy file name to clipboardExpand all lines: tests/ui/lint/non-local-defs/from-local-for-global.stderr
+3-3
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ warning: non-local `impl` definition, `impl` blocks should be written at the sam
4
4
LL | fn main() {
5
5
| --------- move the `impl` block outside of this function `main`
6
6
LL | impl From<Cat> for () {
7
-
| ^^^^^----^^^^^^^^^^--
8
-
| | |
9
-
| | `()` is not local
7
+
| ^^^^^----^---^^^^^^^^
8
+
| | |
9
+
| | `Cat` is not local
10
10
| `From` is not local
11
11
|
12
12
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
Copy file name to clipboardExpand all lines: tests/ui/lint/non-local-defs/generics.stderr
+2-3
Original file line number
Diff line number
Diff line change
@@ -38,9 +38,8 @@ LL | fn bad() {
38
38
| -------- move the `impl` block outside of this function `bad`
39
39
...
40
40
LL | impl<T> Uto8 for T {}
41
-
| ^^^^^^^^----^^^^^-
42
-
| | |
43
-
| | `T` is not local
41
+
| ^^^^^^^^----^^^^^^
42
+
| |
44
43
| `Uto8` is not local
45
44
|
46
45
= note: `impl` may be usable in bounds, etc. from outside the expression, which might e.g. make something constructible that previously wasn't, because it's still on a publicly-visible type
0 commit comments