File: missing-for-type-in-impl.e2021.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 893,176 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; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (31 lines) | stat: -rw-r--r-- 946 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
error[E0277]: the trait bound `i64: Foo<i64>` is not satisfied
  --> $DIR/missing-for-type-in-impl.rs:19:19
   |
LL |     let x: i64 = <i64 as Foo<i64>>::id(10);
   |                   ^^^ the trait `Foo<i64>` is not implemented for `i64`
   |
help: this trait has no implementations, consider adding one
  --> $DIR/missing-for-type-in-impl.rs:3:1
   |
LL | trait Foo<T> {
   | ^^^^^^^^^^^^

error[E0782]: expected a type, found a trait
  --> $DIR/missing-for-type-in-impl.rs:8:6
   |
LL | impl Foo<i64> {
   |      ^^^^^^^^
   |
help: you can add the `dyn` keyword if you want a trait object
   |
LL | impl dyn Foo<i64> {
   |      +++
help: you might have intended to implement this trait for a given type
   |
LL | impl Foo<i64> for /* Type */ {
   |               ++++++++++++++

error: aborting due to 2 previous errors

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