File: issue-85848.stderr

package info (click to toggle)
rustc-web 1.78.0%2Bdfsg1-2~deb11u3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,245,360 kB
  • sloc: xml: 147,985; javascript: 18,022; sh: 11,083; python: 10,265; ansic: 6,172; cpp: 5,023; asm: 4,390; makefile: 4,269
file content (69 lines) | stat: -rw-r--r-- 2,924 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
error[E0277]: the trait bound `(): _Contains<&C>` is not satisfied
  --> $DIR/issue-85848.rs:24:29
   |
LL |     writes_to_specific_path(&cap);
   |     ----------------------- ^^^^ the trait `_Contains<&C>` is not implemented for `()`, which is required by `&C: Delegates<()>`
   |     |
   |     required by a bound introduced by this call
   |
help: this trait has no implementations, consider adding one
  --> $DIR/issue-85848.rs:4:1
   |
LL | trait _Contains<T> {
   | ^^^^^^^^^^^^^^^^^^
note: required for `&C` to implement `Contains<(), true>`
  --> $DIR/issue-85848.rs:21:12
   |
LL | impl<T, U> Contains<T, { contains::<T, U>() }> for U where T: _Contains<U> {}
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^     ^          ------------ unsatisfied trait bound introduced here
note: required for `&C` to implement `Delegates<()>`
  --> $DIR/issue-85848.rs:12:12
   |
LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {}
   |            ^^^^^^^^^^^^     ^          ----------------- unsatisfied trait bound introduced here
note: required by a bound in `writes_to_specific_path`
  --> $DIR/issue-85848.rs:30:31
   |
LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
   |                               ^^^^^^^^^^^^^ required by this bound in `writes_to_specific_path`

error: unconstrained generic constant
  --> $DIR/issue-85848.rs:24:29
   |
LL |     writes_to_specific_path(&cap);
   |     ----------------------- ^^^^
   |     |
   |     required by a bound introduced by this call
   |
   = help: try adding a `where` bound using this expression: `where [(); { contains::<T, U>() }]:`
note: required for `&C` to implement `Contains<(), true>`
  --> $DIR/issue-85848.rs:21:12
   |
LL | impl<T, U> Contains<T, { contains::<T, U>() }> for U where T: _Contains<U> {}
   |            ^^^^^^^^^^^^----------------------^     ^
   |                        |
   |                        unsatisfied trait bound introduced here
note: required for `&C` to implement `Delegates<()>`
  --> $DIR/issue-85848.rs:12:12
   |
LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {}
   |            ^^^^^^^^^^^^     ^          ----------------- unsatisfied trait bound introduced here
note: required by a bound in `writes_to_specific_path`
  --> $DIR/issue-85848.rs:30:31
   |
LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
   |                               ^^^^^^^^^^^^^ required by this bound in `writes_to_specific_path`

error[E0308]: mismatched types
  --> $DIR/issue-85848.rs:24:5
   |
LL |     writes_to_specific_path(&cap);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `true`, found `{ contains::<T, U>() }`
   |
   = note: expected constant `true`
              found constant `{ contains::<T, U>() }`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.