about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2015-08-07 15:51:25 +0200
committerSteven Fackler <sfackler@gmail.com>2015-08-10 20:04:17 -0400
commit91f5d3275f110f627931646fb19f22d8c4dd41c3 (patch)
treea7a4aa4c98c92d42ce882f5b9ecbd5ed6de6d11e
parentab77c1d8d017196a7bd8fac3574eb73dcd54f0a9 (diff)
downloadrust-91f5d3275f110f627931646fb19f22d8c4dd41c3.tar.gz
rust-91f5d3275f110f627931646fb19f22d8c4dd41c3.zip
Turn nonzeroing move hints back off by default.
This is a temporary workaround for the bugs that have been found in
the implementation of PR #26173.

 * pnkfelix is unavailable in the short-term (i.e. for the next week) to fix them.

 * When the bugs are fixed, we will turn this back on by default.

(If you want to play with the known-to-be-buggy optimization in the
meantime, you can opt-back in via the debugging option that this
commit is toggling.)
-rw-r--r--src/librustc/session/config.rs4
-rw-r--r--src/librustc/session/mod.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index f74bb9ee89a..c5db7cd718b 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -596,8 +596,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
           "Force drop flag checks on or off"),
     trace_macros: bool = (false, parse_bool,
           "For every macro invocation, print its name and arguments"),
-    disable_nonzeroing_move_hints: bool = (false, parse_bool,
-          "Force nonzeroing move optimization off"),
+    enable_nonzeroing_move_hints: bool = (false, parse_bool,
+          "Force nonzeroing move optimization on"),
 }
 
 pub fn default_lib_output() -> CrateType {
diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs
index efd46d35f56..99a58f07ae6 100644
--- a/src/librustc/session/mod.rs
+++ b/src/librustc/session/mod.rs
@@ -273,7 +273,7 @@ impl Session {
         self.opts.debugging_opts.print_enum_sizes
     }
     pub fn nonzeroing_move_hints(&self) -> bool {
-        !self.opts.debugging_opts.disable_nonzeroing_move_hints
+        self.opts.debugging_opts.enable_nonzeroing_move_hints
     }
     pub fn sysroot<'a>(&'a self) -> &'a Path {
         match self.opts.maybe_sysroot {