1- error[E0658]: `?Trait` is not permitted in supertraits
1+ error[E0658]: relaxed bounds are not permitted in supertrait bounds
22 --> $DIR/feature-gate-more-maybe-bounds.rs:5:15
33 |
44LL | trait Trait3: ?Trait1 {}
@@ -7,17 +7,18 @@ LL | trait Trait3: ?Trait1 {}
77 = help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
88 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
99
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
1212 |
1313LL | trait Trait4 where Self: ?Trait1 {}
1414 | ^^^^^^^
1515 |
1616 = help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
1717 = 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
1819
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
2122 |
2223LL | fn foo(_: Box<dyn Trait1 + ?Trait2>) {}
2324 | ^^^^^^^
@@ -26,7 +27,7 @@ LL | fn foo(_: Box<dyn Trait1 + ?Trait2>) {}
2627 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
2728
2829error[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
3031 |
3132LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
3233 | ^^^^^^^ ^^^^^^^
@@ -35,31 +36,31 @@ LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
3536 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
3637
3738error: 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
3940 |
4041LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
4142 | ^^^^^^^
4243
4344error: 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
4546 |
4647LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
4748 | ^^^^^^^
4849
4950error[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
5152 |
5253LL | fn baz<T: ?Trait + ?Trait>(_ : T) {}
5354 | ^^^^^^ ^^^^^^
5455
5556error: 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
5758 |
5859LL | fn baz<T: ?Trait + ?Trait>(_ : T) {}
5960 | ^^^^^^
6061
6162error: 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
6364 |
6465LL | fn baz<T: ?Trait + ?Trait>(_ : T) {}
6566 | ^^^^^^
0 commit comments