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
As the try_trait_v2 lingers on, perhaps we can just ignore the lint with something like:
try_trait_v2
use std::fmt; const ERROR_INSTALL_FAILURE: Error = Error(unsafe { std::num::NonZero::<u32>::new_unchecked(1603) }); #[derive(Debug)] #[repr(transparent)] pub struct Error(std::num::NonZero<u32>); impl std::error::Error for Error {} impl fmt::Display for Error { fn fmt(&self, f: &'_ mut fmt::Formatter) -> fmt::Result { f.write_str(&self.0.to_string()) } } pub type Result<T> = std::result::Result<T, Error>; #[allow(improper_ctypes_definitions)] #[no_mangle] pub extern "C" fn print_size() -> Result<()> { println!("{}", std::mem::size_of::<Result<()>>()); Err(ERROR_INSTALL_FAILURE) } fn main() -> std::result::Result<(), Box<dyn std::error::Error>> { Ok(print_size()?) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As the
try_trait_v2
lingers on, perhaps we can just ignore the lint with something like:The text was updated successfully, but these errors were encountered: