1
- error[E0658]: `?Trait` is not permitted in supertraits
1
+ error: relaxed bounds are not permitted in supertrait bounds
2
2
--> $DIR/feature-gate-more-maybe-bounds.rs:5:15
3
3
|
4
4
LL | trait Trait3: ?Trait1 {}
5
5
| ^^^^^^^
6
- |
7
- = help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
8
- = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
9
6
10
- error[E0658]: `?Trait` bounds are only permitted at the point where a type parameter is declared
11
- --> $DIR/feature-gate-more-maybe-bounds.rs:7 :26
7
+ error: this relaxed bound is not permitted here
8
+ --> $DIR/feature-gate-more-maybe-bounds.rs:6 :26
12
9
|
13
10
LL | trait Trait4 where Self: ?Trait1 {}
14
11
| ^^^^^^^
15
12
|
16
- = help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
17
- = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
13
+ = note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
18
14
19
- error[E0658]: `?Trait` is not permitted in trait object types
20
- --> $DIR/feature-gate-more-maybe-bounds.rs:10 :28
15
+ error: relaxed bounds are not permitted in trait object types
16
+ --> $DIR/feature-gate-more-maybe-bounds.rs:8 :28
21
17
|
22
18
LL | fn foo(_: Box<dyn Trait1 + ?Trait2>) {}
23
19
| ^^^^^^^
24
- |
25
- = help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
26
- = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
27
20
28
21
error[E0203]: type parameter has more than one relaxed default bound, only one is supported
29
- --> $DIR/feature-gate-more-maybe-bounds.rs:12 :11
22
+ --> $DIR/feature-gate-more-maybe-bounds.rs:10 :11
30
23
|
31
24
LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
32
25
| ^^^^^^^ ^^^^^^^
@@ -35,36 +28,35 @@ LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
35
28
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
36
29
37
30
error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
38
- --> $DIR/feature-gate-more-maybe-bounds.rs:12 :11
31
+ --> $DIR/feature-gate-more-maybe-bounds.rs:10 :11
39
32
|
40
33
LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
41
34
| ^^^^^^^
42
35
43
36
error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
44
- --> $DIR/feature-gate-more-maybe-bounds.rs:12 :21
37
+ --> $DIR/feature-gate-more-maybe-bounds.rs:10 :21
45
38
|
46
39
LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
47
40
| ^^^^^^^
48
41
49
42
error[E0203]: type parameter has more than one relaxed default bound, only one is supported
50
- --> $DIR/feature-gate-more-maybe-bounds.rs:19 :11
43
+ --> $DIR/feature-gate-more-maybe-bounds.rs:17 :11
51
44
|
52
45
LL | fn baz<T: ?Trait + ?Trait>(_ : T) {}
53
46
| ^^^^^^ ^^^^^^
54
47
55
48
error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
56
- --> $DIR/feature-gate-more-maybe-bounds.rs:19 :11
49
+ --> $DIR/feature-gate-more-maybe-bounds.rs:17 :11
57
50
|
58
51
LL | fn baz<T: ?Trait + ?Trait>(_ : T) {}
59
52
| ^^^^^^
60
53
61
54
error: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
62
- --> $DIR/feature-gate-more-maybe-bounds.rs:19 :20
55
+ --> $DIR/feature-gate-more-maybe-bounds.rs:17 :20
63
56
|
64
57
LL | fn baz<T: ?Trait + ?Trait>(_ : T) {}
65
58
| ^^^^^^
66
59
67
60
error: aborting due to 9 previous errors
68
61
69
- Some errors have detailed explanations: E0203, E0658.
70
- For more information about an error, try `rustc --explain E0203`.
62
+ For more information about this error, try `rustc --explain E0203`.
0 commit comments