-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 on undocumented_unsafe_blocks lint #7979
Comments
@rustbot label +I-ICE |
rustbot
added
the
I-ICE
Issue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️
label
Nov 16, 2021
I am trying to find a minimal reproduce code, but when I copy some unsafe code from my leetcode-rust repo to a single file cargo project, then this ICE was not reproduce. So I think currenly the only way to reproduce this bug/ICE is to clone my leetcode-rust repo |
Here's the MCVE: #![warn(clippy::restriction)]
pub fn print_binary_tree() {
println!("{}", unsafe {
String::from_utf8_unchecked(vec![])
});
} |
Judging from the backtrace it is probably this line:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
step to reproduce
Meta
Rust version (
rustc -Vv
):If I apply some
// Safety: ...
line to solve undocumented_unsafe_blocks lint, then cause another ICE panicThe text was updated successfully, but these errors were encountered: