Closed
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