1
- warning: the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
2
- --> $DIR/opaque-type-unsatisfied-bound.rs:3:12
3
- |
4
- LL | #![feature(negative_bounds, negative_impls)]
5
- | ^^^^^^^^^^^^^^^
6
- |
7
- = note: `#[warn(incomplete_features)]` on by default
8
-
9
1
error[E0308]: mismatched types
10
- --> $DIR/opaque-type-unsatisfied-bound.rs:16 :36
2
+ --> $DIR/opaque-type-unsatisfied-bound.rs:15 :36
11
3
|
12
4
LL | fn weird0() -> impl Sized + !Sized {}
13
5
| ------------------- ^^ types differ
@@ -18,13 +10,13 @@ LL | fn weird0() -> impl Sized + !Sized {}
18
10
found unit type `()`
19
11
20
12
error[E0271]: type mismatch resolving `() == impl !Sized`
21
- --> $DIR/opaque-type-unsatisfied-bound.rs:16 :16
13
+ --> $DIR/opaque-type-unsatisfied-bound.rs:15 :16
22
14
|
23
15
LL | fn weird0() -> impl Sized + !Sized {}
24
16
| ^^^^^^^^^^^^^^^^^^^ types differ
25
17
26
18
error[E0308]: mismatched types
27
- --> $DIR/opaque-type-unsatisfied-bound.rs:19 :36
19
+ --> $DIR/opaque-type-unsatisfied-bound.rs:18 :36
28
20
|
29
21
LL | fn weird1() -> impl Sized + !Sized {}
30
22
| ------------------- ^^ types differ
@@ -35,13 +27,13 @@ LL | fn weird1() -> impl Sized + !Sized {}
35
27
found unit type `()`
36
28
37
29
error[E0271]: type mismatch resolving `() == impl !Sized`
38
- --> $DIR/opaque-type-unsatisfied-bound.rs:19 :16
30
+ --> $DIR/opaque-type-unsatisfied-bound.rs:18 :16
39
31
|
40
32
LL | fn weird1() -> impl Sized + !Sized {}
41
33
| ^^^^^^^^^^^^^^^^^^^ types differ
42
34
43
35
error[E0308]: mismatched types
44
- --> $DIR/opaque-type-unsatisfied-bound.rs:22 :36
36
+ --> $DIR/opaque-type-unsatisfied-bound.rs:21 :36
45
37
|
46
38
LL | fn weird2() -> impl !Sized + Sized {}
47
39
| ------------------- ^^ types differ
@@ -52,26 +44,26 @@ LL | fn weird2() -> impl !Sized + Sized {}
52
44
found unit type `()`
53
45
54
46
error[E0271]: type mismatch resolving `() == impl !Sized`
55
- --> $DIR/opaque-type-unsatisfied-bound.rs:22 :16
47
+ --> $DIR/opaque-type-unsatisfied-bound.rs:21 :16
56
48
|
57
49
LL | fn weird2() -> impl !Sized + Sized {}
58
50
| ^^^^^^^^^^^^^^^^^^^ types differ
59
51
60
52
error[E0277]: the trait bound `impl !Trait: Trait` is not satisfied
61
- --> $DIR/opaque-type-unsatisfied-bound.rs:13 :13
53
+ --> $DIR/opaque-type-unsatisfied-bound.rs:12 :13
62
54
|
63
55
LL | consume(produce());
64
56
| ------- ^^^^^^^^^ the trait `Trait` is not implemented for `impl !Trait`
65
57
| |
66
58
| required by a bound introduced by this call
67
59
|
68
60
note: required by a bound in `consume`
69
- --> $DIR/opaque-type-unsatisfied-bound.rs:10 :20
61
+ --> $DIR/opaque-type-unsatisfied-bound.rs:9 :20
70
62
|
71
63
LL | fn consume(_: impl Trait) {}
72
64
| ^^^^^ required by this bound in `consume`
73
65
74
- error: aborting due to 7 previous errors; 1 warning emitted
66
+ error: aborting due to 7 previous errors
75
67
76
68
Some errors have detailed explanations: E0271, E0277, E0308.
77
69
For more information about an error, try `rustc --explain E0271`.
0 commit comments