1- error[E0658]: `?Trait` is not permitted in supertraits
1+ error: relaxed bounds are not permitted in supertrait bounds
22 --> $DIR/feature-gate-more-maybe-bounds.rs:5:15
33 |
44LL | trait Trait3: ?Trait1 {}
55 | ^^^^^^^
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
96
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
129 |
1310LL | trait Trait4 where Self: ?Trait1 {}
1411 | ^^^^^^^
1512 |
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
1814
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
2117 |
2218LL | fn foo(_: Box<dyn Trait1 + ?Trait2>) {}
2319 | ^^^^^^^
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
2720
2821error[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
3023 |
3124LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
3225 | ^^^^^^^ ^^^^^^^
@@ -35,36 +28,35 @@ LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
3528 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
3629
3730error: 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
3932 |
4033LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
4134 | ^^^^^^^
4235
4336error: 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
4538 |
4639LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
4740 | ^^^^^^^
4841
4942error[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
5144 |
5245LL | fn baz<T: ?Trait + ?Trait>(_ : T) {}
5346 | ^^^^^^ ^^^^^^
5447
5548error: 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
5750 |
5851LL | fn baz<T: ?Trait + ?Trait>(_ : T) {}
5952 | ^^^^^^
6053
6154error: 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
6356 |
6457LL | fn baz<T: ?Trait + ?Trait>(_ : T) {}
6558 | ^^^^^^
6659
6760error: aborting due to 9 previous errors
6861
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