blob: da6ad5f16e20c73973354e9f0d3289e5a46c9d74 [file] [log] [blame]
error: relaxed bounds are not permitted in supertrait bounds
--> $DIR/feature-gate-more-maybe-bounds.rs:5:15
|
LL | trait Trait3: ?Trait1 {}
| ^^^^^^^
error: this relaxed bound is not permitted here
--> $DIR/feature-gate-more-maybe-bounds.rs:6:26
|
LL | trait Trait4 where Self: ?Trait1 {}
| ^^^^^^^
|
= note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
error: relaxed bounds are not permitted in trait object types
--> $DIR/feature-gate-more-maybe-bounds.rs:8:28
|
LL | fn foo(_: Box<dyn Trait1 + ?Trait2>) {}
| ^^^^^^^
error: bound modifier `?` can only be applied to `Sized`
--> $DIR/feature-gate-more-maybe-bounds.rs:10:11
|
LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
| ^^^^^^^
error: bound modifier `?` can only be applied to `Sized`
--> $DIR/feature-gate-more-maybe-bounds.rs:10:21
|
LL | fn bar<T: ?Trait1 + ?Trait2>(_: T) {}
| ^^^^^^^
error: aborting due to 5 previous errors