Skip to content

test: fix inference fail in test #2239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged

test: fix inference fail in test #2239

merged 1 commit into from
Mar 24, 2025

Conversation

DaniPopes
Copy link
Member

error[E0283]: type annotations needed
   --> crates/contract/src/call.rs:838:29
    |
838 |             max_fee_per_gas.to(),
    |                             ^^ cannot infer type of the type parameter `T` declared on the method `to`
    |
    = note: multiple `impl`s satisfying `alloy_primitives::Uint<256, 4>: alloy_primitives::ruint::UintTryTo<_>` found in the `ruint` crate:
            - impl<BITS, LIMBS, BITS_DST, LIMBS_DST> alloy_primitives::ruint::UintTryTo<alloy_primitives::Uint<BITS_DST, LIMBS_DST>> for alloy_primitives::Uint<BITS, LIMBS>
              where the constant `BITS` has type `usize`, the constant `LIMBS` has type `usize`, the constant `BITS_DST` has type `usize`, the constant `LIMBS_DST` has type `usize`;
            - impl<BITS, LIMBS, T> alloy_primitives::ruint::UintTryTo<T> for alloy_primitives::Uint<BITS, LIMBS>
              where for<'a> <T as std::convert::TryFrom<&'a alloy_primitives::Uint<BITS, LIMBS>>>::Error == alloy_primitives::ruint::FromUintError<T>, the constant `LIMBS` has type `usize`, for<'a> T: std::convert::TryFrom<&'a alloy_primitives::Uint<BITS, LIMBS>>, the constant `BITS` has type `usize`;
note: required by a bound in `alloy_primitives::ruint::from::<impl alloy_primitives::Uint<BITS, LIMBS>>::to`
   --> ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ruint-1.13.1/src/from.rs:233:15
    |
231 |     pub fn to<T>(&self) -> T
    |            -- required by a bound in this associated function
232 |     where
233 |         Self: UintTryTo<T>,
    |               ^^^^^^^^^^^^ required by this bound in `alloy_primitives::ruint::from::<impl Uint<BITS, LIMBS>>::to`
help: consider specifying the generic argument
    |
838 |             max_fee_per_gas.to::<T>(),
    |                               +++++

@DaniPopes DaniPopes merged commit 66925da into main Mar 24, 2025
27 checks passed
@DaniPopes DaniPopes deleted the dani/test-fail branch March 24, 2025 12:44
@github-project-automation github-project-automation bot moved this to Done in Alloy Mar 24, 2025
rkrasiuk pushed a commit that referenced this pull request Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants