File: point-at-inference-4.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (40 lines) | stat: -rw-r--r-- 1,179 bytes parent folder | download | duplicates (3)
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
error[E0061]: this method takes 2 arguments but 1 argument was supplied
  --> $DIR/point-at-inference-4.rs:12:7
   |
LL |     s.infer(0i32);
   |       ^^^^^------ argument #2 is missing
   |
note: method defined here
  --> $DIR/point-at-inference-4.rs:4:8
   |
LL |     fn infer(&self, a: A, b: B) {}
   |        ^^^^^        ----  ----
help: provide the argument
   |
LL |     s.infer(0i32, /* b */);
   |            ~~~~~~~~~~~~~~~

error[E0308]: mismatched types
  --> $DIR/point-at-inference-4.rs:19:24
   |
LL |     s.infer(0i32);
   |     -       ---- this argument has type `i32`...
   |     |
   |     ... which causes `s` to have type `S<i32, _>`
...
LL |     let t: S<u32, _> = s;
   |            ---------   ^ expected `S<u32, _>`, found `S<i32, _>`
   |            |
   |            expected due to this
   |
   = note: expected struct `S<u32, _>`
              found struct `S<i32, _>`
help: change the type of the numeric literal from `i32` to `u32`
   |
LL |     s.infer(0u32);
   |              ~~~

error: aborting due to 2 previous errors

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