1
- error[E0658]: `?Trait` is not permitted in supertraits
1
+ error[E0658]: 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 {}
@@ -7,17 +7,18 @@ LL | trait Trait3: ?Trait1 {}
7
7
= help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
8
8
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
9
9
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
10
+ error[E0658]: this relaxed bound is not permitted here
11
+ --> $DIR/feature-gate-more-maybe-bounds.rs:6 :26
12
12
|
13
13
LL | trait Trait4 where Self: ?Trait1 {}
14
14
| ^^^^^^^
15
15
|
16
16
= help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
17
17
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
18
+ = note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
18
19
19
- error[E0658]: `?Trait` is not permitted in trait object types
20
- --> $DIR/feature-gate-more-maybe-bounds.rs:10 :28
20
+ error[E0658]: relaxed bounds are not permitted in trait object types
21
+ --> $DIR/feature-gate-more-maybe-bounds.rs:8 :28
21
22
|
22
23
LL | fn foo(_: Box<dyn Trait1 + ?Trait2>) {}
23
24
| ^^^^^^^
@@ -26,7 +27,7 @@ LL | fn foo(_: Box<dyn Trait1 + ?Trait2>) {}
26
27
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
27
28
28
29
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
30
+ --> $DIR/feature-gate-more-maybe-bounds.rs:10 :11
30
31
|
31
32
LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
32
33
| ^^^^^^^ ^^^^^^^
@@ -35,31 +36,31 @@ LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
35
36
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
36
37
37
38
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
39
+ --> $DIR/feature-gate-more-maybe-bounds.rs:10 :11
39
40
|
40
41
LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
41
42
| ^^^^^^^
42
43
43
44
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
45
+ --> $DIR/feature-gate-more-maybe-bounds.rs:10 :21
45
46
|
46
47
LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
47
48
| ^^^^^^^
48
49
49
50
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
51
+ --> $DIR/feature-gate-more-maybe-bounds.rs:17 :11
51
52
|
52
53
LL | fn baz<T: ?Trait + ?Trait>(_ : T) {}
53
54
| ^^^^^^ ^^^^^^
54
55
55
56
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
57
+ --> $DIR/feature-gate-more-maybe-bounds.rs:17 :11
57
58
|
58
59
LL | fn baz<T: ?Trait + ?Trait>(_ : T) {}
59
60
| ^^^^^^
60
61
61
62
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
63
+ --> $DIR/feature-gate-more-maybe-bounds.rs:17 :20
63
64
|
64
65
LL | fn baz<T: ?Trait + ?Trait>(_ : T) {}
65
66
| ^^^^^^
0 commit comments