You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I accedentally posted the issue for Cargo, but it is a rustc bug.
I already opened the correct issue for rustc: rust-lang/rust#40132
Please just close! :-(
Problem:
rustc crashes with 'internal compiler error' if a special file (see the 'Input' section) is compiled.
Exact error output (run via cargo run):
[me@my_machine rustc_bug_1]$ cargo run
Compiling rustc_bug_1 v0.1.0 (file:///home/me/some_folder/rustc_bug_1)
error: internal compiler error: /checkout/src/librustc_typeck/check/dropck.rs:650: substs for an impl must map types to TyParam
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:417
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: Could not compile `rustc_bug_1`.
To learn more, run the command again with --verbose.
How to reproduce the error:
Create a new (binary) project with cargo new rustc_bug_1 --bin
Put the attached source inside main.rs
Run the project with cargo run
Witness the error ;-)
The error-causeing source:
struct A<T> {
a: T,
}
fn main() {
struct Z {}
let x: A<Z> = A{ a: Z{} };
struct DropStruct;
impl Drop for A<DropStruct> {
fn drop(&mut self) {
println!("I'm dropping an A<DropStruct>!");
}
}
}
Explanation:
I tried some crazy stuff in Rust in order to better understand the languages' semantics when i encountered the bug. I know....usually you cannot specialize the Drop impl, or so the compiler keeps telling me if i further minimize the provided source.
------------IMPORTANT----------------
I accedentally posted the issue for Cargo, but it is a rustc bug.
I already opened the correct issue for rustc:
rust-lang/rust#40132
Please just close! :-(
Problem:
rustc crashes with 'internal compiler error' if a special file (see the 'Input' section) is compiled.
Exact error output (run via
cargo run
):How to reproduce the error:
Create a new (binary) project with
cargo new rustc_bug_1 --bin
Put the attached source inside
main.rs
Run the project with
cargo run
Witness the error ;-)
The error-causeing source:
Explanation:
I tried some crazy stuff in Rust in order to better understand the languages' semantics when i encountered the bug. I know....usually you cannot specialize the Drop impl, or so the compiler keeps telling me if i further minimize the provided source.
Used OS and rust toolchain:
Arch x64 (up2date)
Rust Toolchains:
Tested with all three.
The text was updated successfully, but these errors were encountered: