File: rp_impl_trait_fail.stderr

package info (click to toggle)
rustc 1.86.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 913,560 kB
  • sloc: xml: 158,127; python: 35,921; javascript: 19,689; sh: 19,600; cpp: 18,906; ansic: 13,124; asm: 4,376; makefile: 708; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (55 lines) | stat: -rw-r--r-- 1,946 bytes parent folder | download | duplicates (10)
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
error[E0277]: the trait bound `Uwu<10, 12>: Trait` is not satisfied
  --> $DIR/rp_impl_trait_fail.rs:6:14
   |
LL | fn rawr() -> impl Trait {
   |              ^^^^^^^^^^ the trait `Trait` is not implemented for `Uwu<10, 12>`
LL |
LL |     Uwu::<10, 12>
   |     ------------- return type was inferred to be `Uwu<10, 12>` here
   |
   = help: the trait `Trait` is implemented for `Uwu<N>`

error[E0277]: the trait bound `u32: Traitor<N>` is not satisfied
  --> $DIR/rp_impl_trait_fail.rs:16:26
   |
LL | fn uwu<const N: u8>() -> impl Traitor<N> {
   |                          ^^^^^^^^^^^^^^^ the trait `Traitor<N>` is not implemented for `u32`
LL |
LL |     1_u32
   |     ----- return type was inferred to be `u32` here
   |
   = help: the trait `Traitor<N, N>` is not implemented for `u32`
           but trait `Traitor<N, 2>` is implemented for it

error[E0277]: the trait bound `u64: Traitor` is not satisfied
  --> $DIR/rp_impl_trait_fail.rs:21:13
   |
LL | fn owo() -> impl Traitor {
   |             ^^^^^^^^^^^^ the trait `Traitor` is not implemented for `u64`
LL |
LL |     1_u64
   |     ----- return type was inferred to be `u64` here
   |
   = help: the trait `Traitor<1, 1>` is not implemented for `u64`
           but trait `Traitor<1, 2>` is implemented for it

error[E0284]: type annotations needed
  --> $DIR/rp_impl_trait_fail.rs:28:5
   |
LL |     uwu();
   |     ^^^ cannot infer the value of the const parameter `N` declared on the function `uwu`
   |
note: required by a const generic parameter in `uwu`
  --> $DIR/rp_impl_trait_fail.rs:16:8
   |
LL | fn uwu<const N: u8>() -> impl Traitor<N> {
   |        ^^^^^^^^^^^ required by this const generic parameter in `uwu`
help: consider specifying the generic argument
   |
LL |     uwu::<N>();
   |        +++++

error: aborting due to 4 previous errors

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