1
1
error[E0308]: mismatched types
2
- --> $DIR/pretty.rs:18 :43
2
+ --> $DIR/pretty.rs:21 :43
3
3
|
4
4
LL | fn dyn_super(x: &dyn Super<Assoc = u8>) { x }
5
5
| - ^ expected `()`, found `&dyn Super<Assoc = u8>`
@@ -10,7 +10,7 @@ LL | fn dyn_super(x: &dyn Super<Assoc = u8>) { x }
10
10
found reference `&dyn Super<Assoc = u8>`
11
11
12
12
error[E0308]: mismatched types
13
- --> $DIR/pretty.rs:19 :39
13
+ --> $DIR/pretty.rs:22 :39
14
14
|
15
15
LL | fn dyn_any(x: &dyn Any<Assoc = u8>) { x }
16
16
| - ^ expected `()`, found `&dyn Any<Assoc = u8>`
@@ -21,7 +21,7 @@ LL | fn dyn_any(x: &dyn Any<Assoc = u8>) { x }
21
21
found reference `&dyn Any<Assoc = u8>`
22
22
23
23
error[E0308]: mismatched types
24
- --> $DIR/pretty.rs:20 :31
24
+ --> $DIR/pretty.rs:23 :31
25
25
|
26
26
LL | fn dyn_fixed(x: &dyn Fixed) { x }
27
27
| - ^ expected `()`, found `&dyn Fixed`
@@ -32,7 +32,7 @@ LL | fn dyn_fixed(x: &dyn Fixed) { x }
32
32
found reference `&dyn Fixed`
33
33
34
34
error[E0308]: mismatched types
35
- --> $DIR/pretty.rs:21 :50
35
+ --> $DIR/pretty.rs:24 :50
36
36
|
37
37
LL | fn dyn_fixed_multi(x: &dyn Fixed<Assoc = u16>) { x }
38
38
| - ^ expected `()`, found `&dyn Fixed<Assoc = u16>`
@@ -43,7 +43,7 @@ LL | fn dyn_fixed_multi(x: &dyn Fixed<Assoc = u16>) { x }
43
43
found reference `&dyn Fixed<Assoc = u16>`
44
44
45
45
error[E0308]: mismatched types
46
- --> $DIR/pretty.rs:22 :38
46
+ --> $DIR/pretty.rs:25 :38
47
47
|
48
48
LL | fn dyn_fixed_sub(x: &dyn FixedSub) { x }
49
49
| - ^ expected `()`, found `&dyn FixedSub`
@@ -54,29 +54,40 @@ LL | fn dyn_fixed_sub(x: &dyn FixedSub) { x }
54
54
found reference `&dyn FixedSub`
55
55
56
56
error[E0308]: mismatched types
57
- --> $DIR/pretty.rs:24:74
57
+ --> $DIR/pretty.rs:26:44
58
58
|
59
- LL | fn dyn_super_generic (x: &dyn for<'a> SuperGeneric<'a, Assoc = &'a u8> ) { x }
60
- | - ^ expected `()`, found `&dyn SuperGeneric<'a, Assoc = &u8> `
61
- | |
62
- | help: try adding a return type: `-> &dyn for<'a> SuperGeneric<'a, Assoc = &'a u8> `
59
+ LL | fn dyn_fixed_static (x: &dyn FixedStatic ) { x }
60
+ | - ^ expected `()`, found `&dyn FixedStatic `
61
+ | |
62
+ | help: try adding a return type: `-> &dyn FixedStatic `
63
63
|
64
64
= note: expected unit type `()`
65
- found reference `&dyn for<'a> SuperGeneric<'a, Assoc = &'a u8> `
65
+ found reference `&dyn FixedStatic `
66
66
67
67
error[E0308]: mismatched types
68
- --> $DIR/pretty.rs:25:70
68
+ --> $DIR/pretty.rs:28:75
69
69
|
70
- LL | fn dyn_any_generic (x: &dyn for<'a> AnyGeneric <'a, Assoc = &'a u8>) { x }
71
- | - ^ expected `()`, found `&dyn AnyGeneric <'a, Assoc = &u8>`
72
- | |
73
- | help: try adding a return type: `-> &dyn for<'a> AnyGeneric <'a, Assoc = &'a u8>`
70
+ LL | fn dyn_super_generic (x: &dyn for<'a> SuperGeneric <'a, Assoc2 = &'a u8>) { x }
71
+ | - ^ expected `()`, found `&dyn SuperGeneric <'a, Assoc2 = &u8>`
72
+ | |
73
+ | help: try adding a return type: `-> &dyn for<'a> SuperGeneric <'a, Assoc2 = &'a u8>`
74
74
|
75
75
= note: expected unit type `()`
76
- found reference `&dyn for<'a> AnyGeneric <'a, Assoc = &'a u8>`
76
+ found reference `&dyn for<'a> SuperGeneric <'a, Assoc2 = &'a u8>`
77
77
78
78
error[E0308]: mismatched types
79
- --> $DIR/pretty.rs:26:60
79
+ --> $DIR/pretty.rs:29:71
80
+ |
81
+ LL | fn dyn_any_generic(x: &dyn for<'a> AnyGeneric<'a, Assoc2 = &'a u8>) { x }
82
+ | - ^ expected `()`, found `&dyn AnyGeneric<'a, Assoc2 = &u8>`
83
+ | |
84
+ | help: try adding a return type: `-> &dyn for<'a> AnyGeneric<'a, Assoc2 = &'a u8>`
85
+ |
86
+ = note: expected unit type `()`
87
+ found reference `&dyn for<'a> AnyGeneric<'a, Assoc2 = &'a u8>`
88
+
89
+ error[E0308]: mismatched types
90
+ --> $DIR/pretty.rs:30:60
80
91
|
81
92
LL | fn dyn_fixed_generic1(x: &dyn for<'a> FixedGeneric1<'a>) { x }
82
93
| - ^ expected `()`, found `&dyn FixedGeneric1<'a>`
@@ -87,7 +98,7 @@ LL | fn dyn_fixed_generic1(x: &dyn for<'a> FixedGeneric1<'a>) { x }
87
98
found reference `&dyn for<'a> FixedGeneric1<'a>`
88
99
89
100
error[E0308]: mismatched types
90
- --> $DIR/pretty.rs:27 :60
101
+ --> $DIR/pretty.rs:31 :60
91
102
|
92
103
LL | fn dyn_fixed_generic2(x: &dyn for<'a> FixedGeneric2<'a>) { x }
93
104
| - ^ expected `()`, found `&dyn FixedGeneric2<'a>`
@@ -98,18 +109,18 @@ LL | fn dyn_fixed_generic2(x: &dyn for<'a> FixedGeneric2<'a>) { x }
98
109
found reference `&dyn for<'a> FixedGeneric2<'a>`
99
110
100
111
error[E0308]: mismatched types
101
- --> $DIR/pretty.rs:28:78
112
+ --> $DIR/pretty.rs:32:79
102
113
|
103
- LL | fn dyn_fixed_generic_multi(x: &dyn for<'a> FixedGeneric1<'a, Assoc = &u8>) { x }
104
- | - ^ expected `()`, found `&dyn FixedGeneric1<'a, Assoc = &u8 >`
105
- | |
106
- | help: try adding a return type: `-> &dyn for<'a> FixedGeneric1<'a, Assoc = &u8>`
114
+ LL | fn dyn_fixed_generic_multi(x: &dyn for<'a> FixedGeneric1<'a, Assoc2 = &u8>) { x }
115
+ | - ^ expected `()`, found `&dyn FixedGeneric1<'a, Assoc2 = ... >`
116
+ | |
117
+ | help: try adding a return type: `-> &dyn for<'a> FixedGeneric1<'a, Assoc2 = &u8>`
107
118
|
108
119
= note: expected unit type `()`
109
- found reference `&dyn for<'a> FixedGeneric1<'a, Assoc = &u8>`
120
+ found reference `&dyn for<'a> FixedGeneric1<'a, Assoc2 = &u8>`
110
121
111
122
error[E0308]: mismatched types
112
- --> $DIR/pretty.rs:29 :40
123
+ --> $DIR/pretty.rs:33 :40
113
124
|
114
125
LL | fn dyn_fixed_hrtb(x: &dyn FixedHrtb) { x }
115
126
| - ^ expected `()`, found `&dyn FixedHrtb`
@@ -119,6 +130,28 @@ LL | fn dyn_fixed_hrtb(x: &dyn FixedHrtb) { x }
119
130
= note: expected unit type `()`
120
131
found reference `&dyn FixedHrtb`
121
132
122
- error: aborting due to 11 previous errors
133
+ error[E0308]: mismatched types
134
+ --> $DIR/pretty.rs:34:73
135
+ |
136
+ LL | fn dyn_any_different_binders(x: &dyn AnyDifferentBinders<Assoc = u8>) { x }
137
+ | - ^ expected `()`, found `&dyn AnyDifferentBinders<Assoc = ...>`
138
+ | |
139
+ | help: try adding a return type: `-> &dyn AnyDifferentBinders<Assoc = u8>`
140
+ |
141
+ = note: expected unit type `()`
142
+ found reference `&dyn AnyDifferentBinders<Assoc = u8>`
143
+
144
+ error[E0308]: mismatched types
145
+ --> $DIR/pretty.rs:35:65
146
+ |
147
+ LL | fn dyn_fixed_different_binders(x: &dyn FixedDifferentBinders) { x }
148
+ | - ^ expected `()`, found `&dyn FixedDifferentBinders`
149
+ | |
150
+ | help: try adding a return type: `-> &dyn FixedDifferentBinders`
151
+ |
152
+ = note: expected unit type `()`
153
+ found reference `&dyn FixedDifferentBinders`
154
+
155
+ error: aborting due to 14 previous errors
123
156
124
157
For more information about this error, try `rustc --explain E0308`.
0 commit comments