Skip to content

Commit 20aa27b

Browse files
committed
debugflag to turn off nonzeroing move hint optimization.
(already thumbs-upped pre-rebase by nikomatsakis)
1 parent 9ef61f1 commit 20aa27b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/librustc/session/config.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
594594
"Force drop flag checks on or off"),
595595
trace_macros: bool = (false, parse_bool,
596596
"For every macro invocation, print its name and arguments"),
597+
disable_nonzeroing_move_hints: bool = (false, parse_bool,
598+
"Force nonzeroing move optimization off"),
597599
}
598600

599601
pub fn default_lib_output() -> CrateType {

src/librustc/session/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@ impl Session {
272272
pub fn print_enum_sizes(&self) -> bool {
273273
self.opts.debugging_opts.print_enum_sizes
274274
}
275+
pub fn nonzeroing_move_hints(&self) -> bool {
276+
!self.opts.debugging_opts.disable_nonzeroing_move_hints
277+
}
275278
pub fn sysroot<'a>(&'a self) -> &'a Path {
276279
match self.opts.maybe_sysroot {
277280
Some (ref sysroot) => sysroot,

0 commit comments

Comments
 (0)