1
1
error[E0271]: type mismatch resolving `<Option<<() as Trait>::Ty::{opaque#0}> as IntoIterator>::Item == ()`
2
- --> $DIR/in-assoc-type-unconstrained.rs:8 :19
2
+ --> $DIR/in-assoc-type-unconstrained.rs:6 :19
3
3
|
4
4
LL | type Ty = Option<impl Sized>;
5
5
| ^^^^^^^^^^^^^^^^^^ expected `()`, found opaque type
6
6
|
7
7
= note: expected unit type `()`
8
8
found opaque type `<() as compare_ty::Trait>::Ty::{opaque#0}`
9
9
note: required by a bound in `compare_ty::Trait::Ty`
10
- --> $DIR/in-assoc-type-unconstrained.rs:5 :31
10
+ --> $DIR/in-assoc-type-unconstrained.rs:3 :31
11
11
|
12
12
LL | type Ty: IntoIterator<Item = ()>;
13
13
| ^^^^^^^^^ required by this bound in `Trait::Ty`
14
14
15
15
error: unconstrained opaque type
16
- --> $DIR/in-assoc-type-unconstrained.rs:8 :26
16
+ --> $DIR/in-assoc-type-unconstrained.rs:6 :26
17
17
|
18
18
LL | type Ty = Option<impl Sized>;
19
19
| ^^^^^^^^^^
20
20
|
21
21
= note: `Ty` must be used in combination with a concrete type within the same impl
22
22
23
23
error[E0053]: method `method` has an incompatible type for trait
24
- --> $DIR/in-assoc-type-unconstrained.rs:22 :24
24
+ --> $DIR/in-assoc-type-unconstrained.rs:20 :24
25
25
|
26
26
LL | type Ty = impl Sized;
27
27
| ---------- the expected opaque type
@@ -33,20 +33,20 @@ LL | fn method() -> () {}
33
33
| help: change the output type to match the trait: `<() as compare_method::Trait>::Ty`
34
34
|
35
35
note: type in trait
36
- --> $DIR/in-assoc-type-unconstrained.rs:17 :24
36
+ --> $DIR/in-assoc-type-unconstrained.rs:15 :24
37
37
|
38
38
LL | fn method() -> Self::Ty;
39
39
| ^^^^^^^^
40
40
= note: expected signature `fn() -> <() as compare_method::Trait>::Ty`
41
41
found signature `fn()`
42
42
note: this item must have the opaque type in its signature in order to be able to register hidden types
43
- --> $DIR/in-assoc-type-unconstrained.rs:22 :12
43
+ --> $DIR/in-assoc-type-unconstrained.rs:20 :12
44
44
|
45
45
LL | fn method() -> () {}
46
46
| ^^^^^^
47
47
48
48
error: unconstrained opaque type
49
- --> $DIR/in-assoc-type-unconstrained.rs:20 :19
49
+ --> $DIR/in-assoc-type-unconstrained.rs:18 :19
50
50
|
51
51
LL | type Ty = impl Sized;
52
52
| ^^^^^^^^^^
0 commit comments