]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/generic_const_exprs/issue-85848.stderr
Added docs to internal_macro const
[rust.git] / src / test / 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:5
3    |
4 LL |     writes_to_specific_path(&cap);
5    |     ^^^^^^^^^^^^^^^^^^^^^^^ the trait `_Contains<&C>` is not implemented for `()`
6    |
7 note: required because of the requirements on the impl of `Contains<(), true>` for `&C`
8   --> $DIR/issue-85848.rs:21:12
9    |
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
14    |
15 LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {}
16    |            ^^^^^^^^^^^^     ^
17 note: required by a bound in `writes_to_specific_path`
18   --> $DIR/issue-85848.rs:29:31
19    |
20 LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
21    |                               ^^^^^^^^^^^^^ required by this bound in `writes_to_specific_path`
22
23 error: unconstrained generic constant
24   --> $DIR/issue-85848.rs:24:5
25    |
26 LL |     writes_to_specific_path(&cap);
27    |     ^^^^^^^^^^^^^^^^^^^^^^^
28    |
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
32    |
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
37    |
38 LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {}
39    |            ^^^^^^^^^^^^     ^
40 note: required by a bound in `writes_to_specific_path`
41   --> $DIR/issue-85848.rs:29:31
42    |
43 LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
44    |                               ^^^^^^^^^^^^^ required by this bound in `writes_to_specific_path`
45
46 error: aborting due to 2 previous errors
47
48 For more information about this error, try `rustc --explain E0277`.