-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-codegenArea: Code generationArea: Code generationA-trait-systemArea: Trait systemArea: Trait systemI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Description
The following code compiles but segfaults when run:
trait F<T> {
fn f(self);
}
impl <T> ~[T] : F<T> {
fn f(self) {}
}
fn main() {
(~[1]).f();
}
Changing f
to take &self
makes it work.
This might be related to #4132
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-trait-systemArea: Trait systemArea: Trait systemI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.