]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/generic_const_exprs/issue-85848.stderr
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / const-generics / generic_const_exprs / issue-85848.stderr
CommitLineData
136023e0 1error[E0277]: the trait bound `(): _Contains<&C>` is not satisfied
3c0e092e 2 --> $DIR/issue-85848.rs:24:29
136023e0
XL
3 |
4LL | writes_to_specific_path(&cap);
3c0e092e
XL
5 | ----------------------- ^^^^ the trait `_Contains<&C>` is not implemented for `()`
6 | |
7 | required by a bound introduced by this call
136023e0 8 |
04454e1e 9 = help: the trait `Delegates<U>` is implemented for `T`
f2b60f7d 10note: required for `&C` to implement `Contains<(), true>`
136023e0
XL
11 --> $DIR/issue-85848.rs:21:12
12 |
13LL | impl<T, U> Contains<T, { contains::<T, U>() }> for U where T: _Contains<U> {}
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^
f2b60f7d 15note: required for `&C` to implement `Delegates<()>`
136023e0
XL
16 --> $DIR/issue-85848.rs:12:12
17 |
18LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {}
19 | ^^^^^^^^^^^^ ^
94222f64 20note: required by a bound in `writes_to_specific_path`
04454e1e 21 --> $DIR/issue-85848.rs:30:31
94222f64
XL
22 |
23LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
24 | ^^^^^^^^^^^^^ required by this bound in `writes_to_specific_path`
136023e0
XL
25
26error: unconstrained generic constant
3c0e092e 27 --> $DIR/issue-85848.rs:24:29
136023e0
XL
28 |
29LL | writes_to_specific_path(&cap);
3c0e092e
XL
30 | ----------------------- ^^^^
31 | |
32 | required by a bound introduced by this call
136023e0
XL
33 |
34 = help: try adding a `where` bound using this expression: `where [(); { contains::<T, U>() }]:`
f2b60f7d 35note: required for `&C` to implement `Contains<(), true>`
136023e0
XL
36 --> $DIR/issue-85848.rs:21:12
37 |
38LL | impl<T, U> Contains<T, { contains::<T, U>() }> for U where T: _Contains<U> {}
39 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^
f2b60f7d 40note: required for `&C` to implement `Delegates<()>`
136023e0
XL
41 --> $DIR/issue-85848.rs:12:12
42 |
43LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {}
44 | ^^^^^^^^^^^^ ^
94222f64 45note: required by a bound in `writes_to_specific_path`
04454e1e 46 --> $DIR/issue-85848.rs:30:31
94222f64
XL
47 |
48LL | fn writes_to_specific_path<C: Delegates<()>>(cap: &C) {}
49 | ^^^^^^^^^^^^^ required by this bound in `writes_to_specific_path`
136023e0 50
04454e1e
FG
51error[E0308]: mismatched types
52 --> $DIR/issue-85848.rs:24:5
53 |
54LL | writes_to_specific_path(&cap);
55 | ^^^^^^^^^^^^^^^^^^^^^^^ expected `true`, found `{ contains::<T, U>() }`
56 |
f2b60f7d
FG
57 = note: expected constant `true`
58 found constant `{ contains::<T, U>() }`
04454e1e
FG
59
60error: aborting due to 3 previous errors
136023e0 61
04454e1e
FG
62Some errors have detailed explanations: E0277, E0308.
63For more information about an error, try `rustc --explain E0277`.