-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-codegenArea: Code generationArea: Code generationA-trait-systemArea: Trait systemArea: Trait systemI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
This should not compile (AFAIK, but static methods aren't documented), but it shouldn't ICE either.
output
error: internal compiler error: calling transform_self_type_for_method on static method
rust: task failed at 'explicit failure', /Users/burg/repos/rust/src/libsyntax/diagnostic.rs:78
rust: task failed at 'explicit failure', /Users/burg/repos/rust/src/rustc/driver/rustc.rs:275
rust: domain main @0x7f8c0a800010 root task failed
testcase
struct Obj {
member: uint
}
impl Obj {
static pure fn boom() -> bool {
return 1+1 == 2
}
pure fn chirp() {
self.boom();
}
}
fn main() {
let o = Obj { member: 0 };
o.chirp();
1 + 1;
}
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-trait-systemArea: Trait systemArea: Trait systemI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️