fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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