Closed
Description
Compiler panics and tells me to report the bug.
I tried this code:
use chrono::DateTime;
use chrono::UTC;
extern crate chrono;
enum TagType {
Path(Path),
//http://doc.rust-lang.org/nightly/std/string/struct.String.html
String(String),
//std::fs uses time_t
//https://doc.rust-lang.org/beta/std/fs/struct.Metadata.html
Date(DateTime<UTC>),
}
struct Tag {
name: String,
data: Box<TagType>,
}
impl Tag {
pub fn new(name: String, data: Box<TagType>) -> Tag {
Tag {
name: name,
data: data,
}
}
}
fn main() {
}
I expected to see this happen: the code compiling.
Instead, this happened: a compiler panic
Meta
rustc --version --verbose
:
rustc 1.5.0 (3d7cd77 2015-12-04)
binary: rustc
commit-hash: 3d7cd77
commit-date: 2015-12-04
host: x86_64-unknown-linux-gnu
release: 1.5.0
Backtrace:
error: internal compiler error: unexpected panic
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
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Unexpected type returned from struct_tail: TagType for ty=TagType', ../src/librustc_trans/trans/type_of.rs:385
Could not compile `imgtag`.
Metadata
Metadata
Assignees
Labels
No labels