-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-codegenArea: Code generationArea: Code generationI-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
This code causes a free of garbage memory and crashes:
struct Url {
scheme: ~str,
port: Option<~str>
}
impl Url {
fn normalized_url(&self) {
match self.port {
Some(copy port) if true => {}
_ => {}
}
}
}
fn main() {
let url: Url = Url {
scheme: ~"http",
port: None,
};
url.normalized_url();
}
Doesn't seem to be related to explicit self. The pattern guard is necessary in order to cause the crash.
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationI-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.