|
| 1 | +error[E0277]: the trait bound `(): _Contains<&C>` is not satisfied |
| 2 | + --> $DIR/issue-85848.rs:24:5 |
| 3 | + | |
| 4 | +LL | writes_to_specific_path(&cap); |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `_Contains<&C>` is not implemented for `()` |
| 6 | +... |
| 7 | +LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {} |
| 8 | + | ------------- required by this bound in `writes_to_specific_path` |
| 9 | + | |
| 10 | +note: required because of the requirements on the impl of `Contains<(), true>` for `&C` |
| 11 | + --> $DIR/issue-85848.rs:21:12 |
| 12 | + | |
| 13 | +LL | impl<T, U> Contains<T, { contains::<T, U>() }> for U where T: _Contains<U> {} |
| 14 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ |
| 15 | +note: required because of the requirements on the impl of `Delegates<()>` for `&C` |
| 16 | + --> $DIR/issue-85848.rs:12:12 |
| 17 | + | |
| 18 | +LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {} |
| 19 | + | ^^^^^^^^^^^^ ^ |
| 20 | + |
| 21 | +error: unconstrained generic constant |
| 22 | + --> $DIR/issue-85848.rs:24:5 |
| 23 | + | |
| 24 | +LL | writes_to_specific_path(&cap); |
| 25 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 26 | +... |
| 27 | +LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {} |
| 28 | + | ------------- required by this bound in `writes_to_specific_path` |
| 29 | + | |
| 30 | + = help: try adding a `where` bound using this expression: `where [(); { contains::<T, U>() }]:` |
| 31 | +note: required because of the requirements on the impl of `Contains<(), true>` for `&C` |
| 32 | + --> $DIR/issue-85848.rs:21:12 |
| 33 | + | |
| 34 | +LL | impl<T, U> Contains<T, { contains::<T, U>() }> for U where T: _Contains<U> {} |
| 35 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ |
| 36 | +note: required because of the requirements on the impl of `Delegates<()>` for `&C` |
| 37 | + --> $DIR/issue-85848.rs:12:12 |
| 38 | + | |
| 39 | +LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {} |
| 40 | + | ^^^^^^^^^^^^ ^ |
| 41 | + |
| 42 | +error: aborting due to 2 previous errors |
| 43 | + |
| 44 | +For more information about this error, try `rustc --explain E0277`. |
0 commit comments