@@ -8,11 +8,13 @@ LL | fn bar() -> impl Copy {}
8
8
| ^^^^ this bound is stronger than that defined on the trait
9
9
|
10
10
= note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
11
+ = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
11
12
note: the lint level is defined here
12
13
--> $DIR/refine.rs:1:9
13
14
|
14
15
LL | #![deny(refining_impl_trait)]
15
16
| ^^^^^^^^^^^^^^^^^^^
17
+ = note: `#[deny(refining_impl_trait_reachable)]` implied by `#[deny(refining_impl_trait)]`
16
18
help: replace the return type so that it matches the trait
17
19
|
18
20
LL | fn bar() -> impl Sized {}
@@ -28,6 +30,7 @@ LL | fn bar() {}
28
30
| ^^^^^^^^
29
31
|
30
32
= note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
33
+ = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
31
34
help: replace the return type so that it matches the trait
32
35
|
33
36
LL | fn bar()-> impl Sized {}
@@ -43,13 +46,47 @@ LL | fn bar() -> () {}
43
46
| ^^
44
47
|
45
48
= note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
49
+ = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
46
50
help: replace the return type so that it matches the trait
47
51
|
48
52
LL | fn bar() -> impl Sized {}
49
53
| ~~~~~~~~~~
50
54
51
55
error: impl trait in impl method signature does not match trait method signature
52
- --> $DIR/refine.rs:43:27
56
+ --> $DIR/refine.rs:27:17
57
+ |
58
+ LL | fn bar() -> impl Sized;
59
+ | ---------- return type from trait method defined here
60
+ ...
61
+ LL | fn bar() -> () {}
62
+ | ^^
63
+ |
64
+ = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
65
+ = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
66
+ = note: `#[deny(refining_impl_trait_internal)]` implied by `#[deny(refining_impl_trait)]`
67
+ help: replace the return type so that it matches the trait
68
+ |
69
+ LL | fn bar() -> impl Sized {}
70
+ | ~~~~~~~~~~
71
+
72
+ error: impl trait in impl method signature does not match trait method signature
73
+ --> $DIR/refine.rs:35:17
74
+ |
75
+ LL | fn bar() -> impl Sized;
76
+ | ---------- return type from trait method defined here
77
+ ...
78
+ LL | fn bar() -> () {}
79
+ | ^^
80
+ |
81
+ = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
82
+ = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
83
+ help: replace the return type so that it matches the trait
84
+ |
85
+ LL | fn bar() -> impl Sized {}
86
+ | ~~~~~~~~~~
87
+
88
+ error: impl trait in impl method signature does not match trait method signature
89
+ --> $DIR/refine.rs:45:27
53
90
|
54
91
LL | fn bar<'a>(&'a self) -> impl Sized + 'a;
55
92
| --------------- return type from trait method defined here
@@ -58,10 +95,27 @@ LL | fn bar(&self) -> impl Copy + '_ {}
58
95
| ^^^^ this bound is stronger than that defined on the trait
59
96
|
60
97
= note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
98
+ = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
61
99
help: replace the return type so that it matches the trait
62
100
|
63
101
LL | fn bar(&self) -> impl Sized + '_ {}
64
102
| ~~~~~~~~~~~~~~~
65
103
66
- error: aborting due to 4 previous errors
104
+ error: impl trait in impl method signature does not match trait method signature
105
+ --> $DIR/refine.rs:56:9
106
+ |
107
+ LL | fn bar() -> impl Sized;
108
+ | ---------- return type from trait method defined here
109
+ ...
110
+ LL | fn bar() {}
111
+ | ^^^^^^^^
112
+ |
113
+ = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate
114
+ = note: we are soliciting feedback, see issue #121718 <https://github.com/rust-lang/rust/issues/121718> for more information
115
+ help: replace the return type so that it matches the trait
116
+ |
117
+ LL | fn bar()-> impl Sized {}
118
+ | +++++++++++++
119
+
120
+ error: aborting due to 7 previous errors
67
121
0 commit comments