parent
d7e1bb5ff4
commit
b2b0737fbe
2 changed files with 1 additions and 44 deletions
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue