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