-
Notifications
You must be signed in to change notification settings - Fork 13k
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
LLVM assertion error for #[deriving(PartialEq)] on an unsized type #18805
Comments
Output of #![feature(phase)]
#![no_std]
#![feature(globs)]
#[phase(plugin, link)]
extern crate "std" as std;
extern crate "native" as rt;
#[prelude_import]
use std::prelude::*;
pub struct Wtf8Slice {
bytes: [u8],
}
#[automatically_derived]
impl ::std::cmp::PartialEq for Wtf8Slice {
#[inline]
fn eq(&self, __arg_0: &Wtf8Slice) -> ::bool {
match *__arg_0 {
Wtf8Slice { bytes: ref __self_1_0 } =>
match *self {
Wtf8Slice { bytes: ref __self_0_0 } =>
true && (*__self_0_0) == (*__self_1_0),
},
}
}
#[inline]
fn ne(&self, __arg_0: &Wtf8Slice) -> ::bool {
match *__arg_0 {
Wtf8Slice { bytes: ref __self_1_0 } =>
match *self {
Wtf8Slice { bytes: ref __self_0_0 } =>
false || (*__self_0_0) != (*__self_1_0),
},
}
}
} |
A similar problem, with a different error: struct Foo {
bytes: [u8],
}
fn bar(&Foo { ref bytes }: &Foo) {} Output of
This also applies to tuple structs with an unsized field. |
@apasel422 That looks like #19064 |
This still ICEs for me. |
It still ICEs. Looks like the core issue is trying to store a %struct.Wtf8Slice** in an alloca for {i8*, i64} . |
This is now a segfault: #![crate_type="lib"]
#[derive(PartialEq)]
pub struct Wtf8Slice {
bytes: [u8]
} $ rustc main.rs
Segmentation fault: 11 |
Does not seem to be an issue on 1.2+ |
Indeed, I can’t reproduce this anymore. |
internal: Implement `<RaSpanServer as SourceFile>::eq`
Test case:
Output of rustc nigthly 45cbdec 2014-11-07:
The text was updated successfully, but these errors were encountered: