-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 due to bad sized to unsized pointer cast in const item #115998
Comments
Looks like it also happens without the re-borrow, but with a different error. pub struct Data([u8]);
const _: *const Data = &[] as *const Data; Backtrace
|
#115998 (comment) found 7 bors merge commits in the specified range |
#115998 (comment) |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-medium |
This also returns ICE, but ICE message varies between rustc version. pub struct Data([u8]);
fn main(){
let _f = &[] as *const Data;
} |
Rollup merge of rust-lang#116056 - ouz-a:wide_ice, r=compiler-errors Make unsized casts illegal Weirdly enough this rust-lang#115998 issue seems to exist since Rust 1.0 (couldn't check before that) but it's only recently been noticed. This change makes those casts illegal. Fixes rust-lang#115998
Code
Playgrounds
Meta
rustc --version --verbose
:On playgrounds it seemed to affect
release
anddebug
forstable
,nightly
andbeta
.Error output
Backtrace
The text was updated successfully, but these errors were encountered: