I'm trying to constrain the value of an associated type of a trait inside a benchmark's where
bound, like this:
#[benchmarks(where T: currency::Config<Balance = u128>)]
pub mod benchmarks {
use super::*;
#[benchmark]
pub fn set_nomination_enabled() {
#[extrinsic_call]
_(RawOrigin::Root, true);
}
}
However, this results in an error:
error[E0284]: type annotations needed
|
122 | #[benchmarks(where T: currency::Config<Balance = u128>)]
| ^^^^^^^^^^^^^^ cannot infer type
|
= note: cannot satisfy `<T as currency::Config>::Balance == _`
The type annotations needed
error does not make any sense to me, and I suspect it may be because of some cleverness by the macro.. Am I doing something wrong?