1 error[E0277]: the trait bound `(): _Contains<&C>` is not satisfied
2 --> $DIR/issue-85848.rs:24:29
4 LL | writes_to_specific_path(&cap);
5 | ----------------------- ^^^^ the trait `_Contains<&C>` is not implemented for `()`
7 | required by a bound introduced by this call
9 = help: the trait `Delegates<U>` is implemented for `T`
10 note: required for `&C` to implement `Contains<(), true>`
11 --> $DIR/issue-85848.rs:21:12
13 LL | impl<T, U> Contains<T, { contains::<T, U>() }> for U where T: _Contains<U> {}
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ ------------ unsatisfied trait bound introduced here
15 note: required for `&C` to implement `Delegates<()>`
16 --> $DIR/issue-85848.rs:12:12
18 LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {}
19 | ^^^^^^^^^^^^ ^ ----------------- unsatisfied trait bound introduced here
20 note: required by a bound in `writes_to_specific_path`
21 --> $DIR/issue-85848.rs:30:31
23 LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
24 | ^^^^^^^^^^^^^ required by this bound in `writes_to_specific_path`
26 error: unconstrained generic constant
27 --> $DIR/issue-85848.rs:24:29
29 LL | writes_to_specific_path(&cap);
30 | ----------------------- ^^^^
32 | required by a bound introduced by this call
34 = help: try adding a `where` bound using this expression: `where [(); { contains::<T, U>() }]:`
35 note: required for `&C` to implement `Contains<(), true>`
36 --> $DIR/issue-85848.rs:21:12
38 LL | impl<T, U> Contains<T, { contains::<T, U>() }> for U where T: _Contains<U> {}
39 | ^^^^^^^^^^^^----------------------^ ^
41 | unsatisfied trait bound introduced here
42 note: required for `&C` to implement `Delegates<()>`
43 --> $DIR/issue-85848.rs:12:12
45 LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {}
46 | ^^^^^^^^^^^^ ^ ----------------- unsatisfied trait bound introduced here
47 note: required by a bound in `writes_to_specific_path`
48 --> $DIR/issue-85848.rs:30:31
50 LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
51 | ^^^^^^^^^^^^^ required by this bound in `writes_to_specific_path`
53 error[E0308]: mismatched types
54 --> $DIR/issue-85848.rs:24:5
56 LL | writes_to_specific_path(&cap);
57 | ^^^^^^^^^^^^^^^^^^^^^^^ expected `true`, found `{ contains::<T, U>() }`
59 = note: expected constant `true`
60 found constant `{ contains::<T, U>() }`
62 error: aborting due to 3 previous errors
64 Some errors have detailed explanations: E0277, E0308.
65 For more information about an error, try `rustc --explain E0277`.