error not-callable
Выражение нельзя вызвать.
What it means#
Only functions, closures, methods, type constructors and values of a type that declares op () can be called with (...) (§5.3, §6.1). Calling an integer, a string or a struct without a call operator is an error.
Example#
fn main() {
let n = 5
let m = n(2) // <- not-callable
}error
not-callable
How to fix#
fn main() {
let n = 5
let m = n * 2
}Remove the call parentheses, or declare op () in an impl of the type if call syntax is intended.