about summary refs log tree commit diff
path: root/tests/ui/suggestions/fn-trait-notation.stderr
blob: 9b47c8c02a782ab7a6fb0eb6275839947ef91779 (plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
  --> $DIR/fn-trait-notation.rs:4:8
   |
LL |     F: Fn<i32, Output = i32>,
   |        ^^^^^^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(i32) -> i32`
   |
   = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
  --> $DIR/fn-trait-notation.rs:6:8
   |
LL |     G: Fn<(i32, i32, ), Output = (i32, i32)>,
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(i32, i32) -> (i32, i32)`
   |
   = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change
  --> $DIR/fn-trait-notation.rs:7:8
   |
LL |     H: Fn<(i32,), Output = i32>,
   |        ^^^^^^^^^^^^^^^^^^^^^^^^ help: use parenthetical notation instead: `Fn(i32) -> i32`
   |
   = note: see issue #29625 <https://github.com/rust-lang/rust/issues/29625> for more information
   = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

error[E0059]: type parameter to bare `Fn` trait must be a tuple
  --> $DIR/fn-trait-notation.rs:4:8
   |
LL |     F: Fn<i32, Output = i32>,
   |        ^^^^^^^^^^^^^^^^^^^^^ 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[E0059]: cannot use call notation; the first type parameter for the function trait is neither a tuple nor unit
  --> $DIR/fn-trait-notation.rs:9:5
   |
LL |     f(3);
   |     ^^^^

error[E0277]: `i32` is not a tuple
  --> $DIR/fn-trait-notation.rs:9:5
   |
LL |     f(3);
   |     ^^^^ the trait `Tuple` is not implemented for `i32`

error[E0308]: mismatched types
  --> $DIR/fn-trait-notation.rs:17:5
   |
LL | /     e0658(
LL | |         |a| a,
LL | |         |a, b| (b, a),
LL | |         |a| a,
LL | |     );
   | |_____^ types differ
   |
   = note: expected trait `Fn<i32>`
              found trait `Fn(_)`
note: required by a bound in `e0658`
  --> $DIR/fn-trait-notation.rs:4:8
   |
LL | fn e0658<F, G, H>(f: F, g: G, h: H) -> i32
   |    ----- required by a bound in this function
LL | where
LL |     F: Fn<i32, Output = i32>,
   |        ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `e0658`

error: aborting due to 7 previous errors

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