-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
unexpected compiler panic in cast.rs #46365
Comments
Hi do you have the code that caused this bug? Thanks! |
Instead of using accountable_refcell was in the Cargo.toml, but I'd forgotten to put an extern crate in lib.rs. Then I ran ./mach check (equiv to cargo check) |
@avadacatavra I just noticed that the nightly version in the report is |
This reproduces the ICE (on beta but not on stable) use std::fmt;
fn main() {
let foo: *mut (fmt::Display,) = 0 as *mut _;
} Now the question is whether @avadacatavra had a different reproduction |
So I found the "real" example: use std::fmt;
struct Lorem {
ipsum: Ipsum
}
fn main() {
let foo: *mut Lorem = 0 as *mut _;
} |
…crum Restore a test that was intended to test `as` cast to ptr This test was changed in rust-lang#61864, but the original bug rust-lang#46365 was about casts so I doubt the changed test still even tests what this was intended to test. Let's restore the original test.
…crum Restore a test that was intended to test `as` cast to ptr This test was changed in rust-lang#61864, but the original bug rust-lang#46365 was about casts so I doubt the changed test still even tests what this was intended to test. Let's restore the original test.
Not totally sure why this happened. When I forgot an
extern crate
the compiler panicked with the following backtraceThe text was updated successfully, but these errors were encountered: