We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Minimum reproduction:
contract; use std::convert::*; use std::primitive_conversions::u64::*; abi MyContract { fn test_function() -> bool; } impl MyContract for Contract { fn test_function() -> bool { true } } pub struct MyStruct { inner_val: u64, } impl MyStruct { pub fn new<T>(val: T) -> Self where T: Into<u64> { MyStruct { inner_val: val.into() } } } #[test] fn test_method() { let s1 = MyStruct::new(1u8); assert(s1.inner_val == 1); }
Despite impl From<u8> for u64 existing, and
impl From<u8> for u64
impl<T, U> Into<U> for T where U: From<T>, {
existing, the compiler errors with ^^^^^^^^^^^^ Trait "Into<u64>" is not implemented for type "u8".
^^^^^^^^^^^^ Trait "Into<u64>" is not implemented for type "u8".
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Minimum reproduction:
Despite
impl From<u8> for u64
existing, andexisting, the compiler errors with
^^^^^^^^^^^^ Trait "Into<u64>" is not implemented for type "u8".
The text was updated successfully, but these errors were encountered: