-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I'm getting a very touchy ICE on rustc 1.33.0-nightly (9eac38634 2018-12-31) running on x86_64-unknown-linux-gnu
. I'm not 100% sure what it has to do with...
Here is the minimum example I can trigger the ICE with:
// in `crate::signature` / `src/signature.rs`
use crate::field::BaseType;
pub enum ObjectType {
Class(ClassTypeSignature),
Array(TypeSignature),
TypeVariable(()),
}
pub struct ClassTypeSignature {
pub package: (),
pub class: (),
pub inner: (),
}
pub enum TypeSignature {
Base(BaseType),
Object(ObjectType),
}
// in `crate::field` / `src/field.rs`
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
pub enum BaseType {
Byte,
Char,
Double,
Float,
Int,
Long,
Short,
Boolean,
}
I'm expecting to see an error about an infinitely-sized type, but instead the compiler crashes. Changes that make the compiler not ICE:
- Moving
field::BaseType
intosignature
- Making
ObjectType
/TypeSignature
not mutually recursive - Rearranging or removing any field/variant from any of these structs/enums
- Making
ObjectType::Class
not containClassTypeSignature
Output of RUST_BACKTRACE=1 cargo build
: https://gist.github.com/XavilPergis/102774c6c542403db10a351ff013f356
Original code that ICE'd: https://gist.github.com/XavilPergis/dafc2bb478f18cee700f78e16eea81cd
repnop, estebank and jdeokkim
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.