Error in compiling Trust: error [e0061]: this function takes 1 argument but 2 arguments were supplied
I didn’t find the relevant information. The preliminary judgment may be the problem of the version, because the code can be compiled in a low version.
Solutions are for reference only:
Error code:
let secret_number = rand::thread_rng().gen_range(1, 101);
Correct code:
let secret_number = rand::thread_rng().gen_range(1..101);
Compile after modification.
Read More:
- TypeError: __array__() takes 1 positional argument but 2 were given
- Pytorch TypeError: __array__() takes 1 positional argument but 2 were given
- TypeError: translate() takes exactly one argument (2 given)
- Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes
- [problem record] objc_ Too many arguments to function call
- SystemError: new style getargs format but argument is not a tuple
- Python TypeError: ‘newline’ is an invalid keyword argument for this function
- [Qt] error: call to non-static member function without an object argument
- AngularJS–[ng:areq] Argument ‘xxCtrl’ is not a function, got undefined! Error (Fixed)
- RuntimeError: ‘lengths’ argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor
- [Solved] RuntimeError: Expected object of scalar type Float but got scalar type Double for argument #2 ‘mat1‘
- Redis takes the member with the largest score in Zset
- Matlab: successfully solve too many input arguments
- Matlab prompts undefined operator ‘*’ for input arguments of type ‘cell’
- [Solved] #command-line-arguments .\main.go:5:4: no new variables on left side of :=
- Python ValueError: only 2 non-keyword arguments accepted
- Python TypeError: not all arguments converted during string formatting [Solved]
- Deep learning: derivation of sigmoid function and loss function
- Golang timer function executes a function every few minutes
- error: unrecognized argument in option ‘-mabi=apcs-gnu‘