1
1
error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
2
- --> $DIR/hidden-type-suggestion.rs:5 :5
2
+ --> $DIR/hidden-type-suggestion.rs:3 :5
3
3
|
4
4
LL | fn lifetime<'a, 'b>(x: &'a ()) -> impl Sized + use<'b> {
5
5
| -- -------------------- opaque type defined here
@@ -15,7 +15,7 @@ LL | fn lifetime<'a, 'b>(x: &'a ()) -> impl Sized + use<'b, 'a> {
15
15
| ++++
16
16
17
17
error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
18
- --> $DIR/hidden-type-suggestion.rs:11 :5
18
+ --> $DIR/hidden-type-suggestion.rs:9 :5
19
19
|
20
20
LL | fn param<'a, T>(x: &'a ()) -> impl Sized + use<T> {
21
21
| -- ------------------- opaque type defined here
@@ -31,7 +31,7 @@ LL | fn param<'a, T>(x: &'a ()) -> impl Sized + use<'a, T> {
31
31
| +++
32
32
33
33
error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
34
- --> $DIR/hidden-type-suggestion.rs:17 :5
34
+ --> $DIR/hidden-type-suggestion.rs:15 :5
35
35
|
36
36
LL | fn empty<'a>(x: &'a ()) -> impl Sized + use<> {
37
37
| -- ------------------ opaque type defined here
@@ -47,7 +47,7 @@ LL | fn empty<'a>(x: &'a ()) -> impl Sized + use<'a> {
47
47
| ++
48
48
49
49
error[E0700]: hidden type for `impl Captures<'captured>` captures lifetime that does not appear in bounds
50
- --> $DIR/hidden-type-suggestion.rs:26 :5
50
+ --> $DIR/hidden-type-suggestion.rs:24 :5
51
51
|
52
52
LL | fn missing<'a, 'captured, 'not_captured, Captured>(x: &'a ()) -> impl Captures<'captured> {
53
53
| -- ------------------------ opaque type defined here
@@ -63,7 +63,7 @@ LL | fn missing<'a, 'captured, 'not_captured, Captured>(x: &'a ()) -> impl Captu
63
63
| ++++++++++++++++++++++++++++++
64
64
65
65
error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
66
- --> $DIR/hidden-type-suggestion.rs:32 :5
66
+ --> $DIR/hidden-type-suggestion.rs:30 :5
67
67
|
68
68
LL | fn no_params_yet(_: impl Sized, y: &()) -> impl Sized {
69
69
| --- ---------- opaque type defined here
74
74
| ^
75
75
|
76
76
note: you could use a `use<...>` bound to explicitly capture `'_`, but argument-position `impl Trait`s are not nameable
77
- --> $DIR/hidden-type-suggestion.rs:30 :21
77
+ --> $DIR/hidden-type-suggestion.rs:28 :21
78
78
|
79
79
LL | fn no_params_yet(_: impl Sized, y: &()) -> impl Sized {
80
80
| ^^^^^^^^^^
@@ -84,7 +84,7 @@ LL | fn no_params_yet<T: Sized>(_: T, y: &()) -> impl Sized + use<'_, T> {
84
84
| ++++++++++ ~ ++++++++++++
85
85
86
86
error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
87
- --> $DIR/hidden-type-suggestion.rs:38 :5
87
+ --> $DIR/hidden-type-suggestion.rs:36 :5
88
88
|
89
89
LL | fn yes_params_yet<'a, T>(_: impl Sized, y: &'a ()) -> impl Sized {
90
90
| -- ---------- opaque type defined here
95
95
| ^
96
96
|
97
97
note: you could use a `use<...>` bound to explicitly capture `'a`, but argument-position `impl Trait`s are not nameable
98
- --> $DIR/hidden-type-suggestion.rs:36 :29
98
+ --> $DIR/hidden-type-suggestion.rs:34 :29
99
99
|
100
100
LL | fn yes_params_yet<'a, T>(_: impl Sized, y: &'a ()) -> impl Sized {
101
101
| ^^^^^^^^^^
0 commit comments