Error: local ambiguity: multiple parsing options: built-in NTs meta

Viewed 90

I am building a substrate pallet where you can deposit your funds:

decl_module! {
    pub struct Module<T: Config> for enum Call where origin: T::Origin {
        fn deposit_event() = default;
        type Error = Error<T>;

        /// Deposit funds
        #[pallet::weight(T::WeightInfo::deposit())]
        pub fn deposit(origin: OriginFor<T>, amount: BalanceOf<T>) -> DispatchResult {
            let user = ensure_signed(origin)?;

            // Get address info of extrinsic caller
            let mut address_info = <Accounts<T>>::get(&user);

            // Get current block
            let current_block = frame_system::Pallet::<T>::block_number();

            // Deposit funds to pallet
            T::Currency::transfer(
                &user,
                &Self::account_id(),
                amount,
                ExistenceRequirement::AllowDeath,
            )?;
        }
    }
}

And than I get this error:

error: local ambiguity: multiple parsing options: built-in NTs meta ('fn_attr') or 1 other option.
             /// Deposit funds
             ^^^^^^^^^^^^^^^^^

Any idea what is the problem?

1 Answers
Related