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
ICE: None
in unused_io_amount
#12366
Comments
Your code doesn't seem to compile, even with: const C: () = unsafe {
let foo = Some(&42 as *const _ as *const libc::c_void);
let one_and_a_half_pointers = std::mem::size_of::<*const i32>()/2*3;
(&foo as *const _ as *const u8).add(one_and_a_half_pointers).read();
}; Did I miss something? |
What do you think you're missing? 😅 |
No clue, hence why I'm asking. 😆 |
I tried compiling this
and well, it didn't work:
As for the underlying unwrap on a None causing an ICE. That's straight forward to resolve, but I am curious if the issue is a bad assumption at the lint level on top of explicit unwrap. @rustbot label +needs-mcve |
Doesn't reproduce on nightly. Lints shouldn't have even run due to |
Remove `unwrap` from `match_trait_method` Unused_IO_amount relies on `match_trait_method` in order to match trait methods that exist in Tokio traits as the corresponding symbols don't exist. With this commit we remove the unwrap that caused #12366. Note: author (`@m-rph)` and `@GuillaumeGomez` couldn't replicate #12366. r? `@blyxyas`
Remove `unwrap` from `match_trait_method` Unused_IO_amount relies on `match_trait_method` in order to match trait methods that exist in Tokio traits as the corresponding symbols don't exist. With this commit we remove the unwrap that caused #12366. Note: author (`@m-rph)` and `@GuillaumeGomez` couldn't replicate #12366. changelog:none r? `@blyxyas`
Summary
Version
Error output
Backtrace
The text was updated successfully, but these errors were encountered: