about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-more-maybe-bounds.stderr
blob: da6ad5f16e20c73973354e9f0d3289e5a46c9d74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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