File: E0059.stderr

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 934,128 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (25 lines) | stat: -rw-r--r-- 929 bytes parent folder | download | duplicates (16)
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
error[E0059]: type parameter to bare `Fn` trait must be a tuple
  --> $DIR/E0059.rs:3:11
   |
LL | fn foo<F: Fn<i32>>(f: F) -> F::Output { f(3) }
   |           ^^^^^^^ the trait `Tuple` is not implemented for `i32`
   |
note: required by a bound in `Fn`
  --> $SRC_DIR/core/src/ops/function.rs:LL:COL

error[E0277]: `i32` is not a tuple
  --> $DIR/E0059.rs:3:41
   |
LL | fn foo<F: Fn<i32>>(f: F) -> F::Output { f(3) }
   |                                         ^^^^ the trait `Tuple` is not implemented for `i32`

error[E0059]: cannot use call notation; the first type parameter for the function trait is neither a tuple nor unit
  --> $DIR/E0059.rs:3:41
   |
LL | fn foo<F: Fn<i32>>(f: F) -> F::Output { f(3) }
   |                                         ^^^^

error: aborting due to 3 previous errors

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