]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_const_exprs/issue-85848.stderr
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[rust.git] / tests / ui / const-generics / generic_const_exprs / issue-85848.stderr
1 error[E0277]: the trait bound `(): _Contains<&C>` is not satisfied
2   --> $DIR/issue-85848.rs:24:29
3    |
4 LL |     writes_to_specific_path(&cap);
5    |     ----------------------- ^^^^ the trait `_Contains<&C>` is not implemented for `()`
6    |     |
7    |     required by a bound introduced by this call
8    |
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
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
17    |
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
22    |
23 LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
24    |                               ^^^^^^^^^^^^^ required by this bound in `writes_to_specific_path`
25
26 error: unconstrained generic constant
27   --> $DIR/issue-85848.rs:24:29
28    |
29 LL |     writes_to_specific_path(&cap);
30    |     ----------------------- ^^^^
31    |     |
32    |     required by a bound introduced by this call
33    |
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
37    |
38 LL | impl<T, U> Contains<T, { contains::<T, U>() }> for U where T: _Contains<U> {}
39    |            ^^^^^^^^^^^^----------------------^     ^
40    |                        |
41    |                        unsatisfied trait bound introduced here
42 note: required for `&C` to implement `Delegates<()>`
43   --> $DIR/issue-85848.rs:12:12
44    |
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
49    |
50 LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
51    |                               ^^^^^^^^^^^^^ required by this bound in `writes_to_specific_path`
52
53 error[E0308]: mismatched types
54   --> $DIR/issue-85848.rs:24:5
55    |
56 LL |     writes_to_specific_path(&cap);
57    |     ^^^^^^^^^^^^^^^^^^^^^^^ expected `true`, found `{ contains::<T, U>() }`
58    |
59    = note: expected constant `true`
60               found constant `{ contains::<T, U>() }`
61
62 error: aborting due to 3 previous errors
63
64 Some errors have detailed explanations: E0277, E0308.
65 For more information about an error, try `rustc --explain E0277`.