Closed
Description
The following code has a valgrind error when compiled with --opt-level=2 or greater. I have a mystery crash in a program of mine whenever optimizations are enabled, and hitting this is the first sign of anything amiss.
use std::io::{IoError, standard_error, InvalidInput};
fn main() {
(|err: IoError|
match &match err.detail {
Some(s) => "",
_ => ""
} {
_ => box 0u
}
)(standard_error(InvalidInput));
}
The offending line is the box 0u
. The weird match &match var { ... } { ... }
expression comes from inside a format!
Edit: My crash had nothing to do with this. I don't think this is a serious bug.
Metadata
Metadata
Assignees
Labels
No labels