about summary refs log tree commit diff
diff options
context:
space:
mode:
authorColin Davidson <colrdavidson@gmail.com>2014-09-21 00:08:00 -0400
committerColin Davidson <colrdavidson@gmail.com>2014-09-21 00:52:04 -0400
commitb2b0737fbe1b4be62cb3656dabf69c0eb7c5a89e (patch)
treecb33295ccceba327df1e4b3216ac4b8f9c184135
parentd7e1bb5ff4622694d48905e944c1cf9bea7a5da7 (diff)
downloadrust-b2b0737fbe1b4be62cb3656dabf69c0eb7c5a89e.tar.gz
rust-b2b0737fbe1b4be62cb3656dabf69c0eb7c5a89e.zip
Remove -Z no-opt flag.
Closes #13649
-rw-r--r--src/librustc/driver/config.rs6
-rw-r--r--src/test/run-pass/capture_nil.rs39
2 files changed, 1 insertions, 44 deletions
diff --git a/src/librustc/driver/config.rs b/src/librustc/driver/config.rs
index 72e2d244ad3..dae6a692fa1 100644
--- a/src/librustc/driver/config.rs
+++ b/src/librustc/driver/config.rs
@@ -176,7 +176,6 @@ debugging_opts!(
         SHOW_SPAN,
         COUNT_TYPE_SIZES,
         META_STATS,
-        NO_OPT,
         GC,
         PRINT_LINK_ARGS,
         PRINT_LLVM_PASSES,
@@ -212,7 +211,6 @@ pub fn debugging_opts_map() -> Vec<(&'static str, &'static str, u64)> {
      ("count-type-sizes", "count the sizes of aggregate types",
       COUNT_TYPE_SIZES),
      ("meta-stats", "gather metadata statistics", META_STATS),
-     ("no-opt", "do not optimize, even if -O is passed", NO_OPT),
      ("print-link-args", "Print the arguments passed to the linker",
       PRINT_LINK_ARGS),
      ("gc", "Garbage collect shared data (experimental)", GC),
@@ -714,9 +712,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
     let target = matches.opt_str("target").unwrap_or(
         driver::host_triple().to_string());
     let opt_level = {
-        if (debugging_opts & NO_OPT) != 0 {
-            No
-        } else if matches.opt_present("O") {
+        if matches.opt_present("O") {
             if matches.opt_present("opt-level") {
                 early_error("-O and --opt-level both provided");
             }
diff --git a/src/test/run-pass/capture_nil.rs b/src/test/run-pass/capture_nil.rs
deleted file mode 100644
index 2113e5d0f47..00000000000
--- a/src/test/run-pass/capture_nil.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags:-Z no-opt
-
-// This test has to be setup just so to trigger
-// the condition which was causing us a crash.
-// The situation is that we are capturing a
-// () value by ref.  We generally feel free,
-// however, to substitute NULL pointers and
-// undefined values for values of () type, and
-// so this caused a segfault when we copied into
-// the closure.
-//
-// The fix is just to not emit any actual loads
-// or stores for copies of () type (which is of
-// course preferable, as the value itself is
-// irrelevant).
-
-use std::task;
-
-fn foo(x: ()) -> Receiver<()> {
-    let (tx, rx) = channel::<()>();
-    task::spawn(proc() {
-        tx.send(x);
-    });
-    rx
-}
-
-pub fn main() {
-    foo(()).recv()
-}