Skip to content

Commit 8694424

Browse files
committed
auto merge of #20360 : alexcrichton/rust/rollup, r=alexcrichton
2 parents 84f5ad8 + d09bb00 commit 8694424

File tree

266 files changed

+5072
-5189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+5072
-5189
lines changed

mk/clean.mk

+3-2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ clean-generic-$(2)-$(1):
6464
-name '*.dll' -o \
6565
-name '*.def' -o \
6666
-name '*.py' -o \
67+
-name '*.pyc' -o \
6768
-name '*.bc' \
6869
\) \
6970
| xargs rm -f
@@ -79,7 +80,7 @@ define CLEAN_HOST_STAGE_N
7980

8081
clean$(1)_H_$(2): \
8182
$$(foreach crate,$$(CRATES),clean$(1)_H_$(2)-lib-$$(crate)) \
82-
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS),clean$(1)_H_$(2)-tool-$$(tool))
83+
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS_ALL),clean$(1)_H_$(2)-tool-$$(tool))
8384
$$(Q)rm -fr $(2)/rt/libbacktrace
8485

8586
clean$(1)_H_$(2)-tool-%:
@@ -99,7 +100,7 @@ define CLEAN_TARGET_STAGE_N
99100

100101
clean$(1)_T_$(2)_H_$(3): \
101102
$$(foreach crate,$$(CRATES),clean$(1)_T_$(2)_H_$(3)-lib-$$(crate)) \
102-
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
103+
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS_ALL),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
103104
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
104105
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libcompiler-rt.a
105106
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/librun_pass_stage* # For unix

mk/debuggers.mk

+88-13
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,77 @@
1212
# Copy debugger related scripts
1313
######################################################################
1414

15-
DEBUGGER_RUSTLIB_ETC_SCRIPTS=lldb_rust_formatters.py
16-
DEBUGGER_BIN_SCRIPTS=rust-lldb
1715

18-
DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS=$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS), \
19-
$(CFG_SRC_DIR)src/etc/$(script))
20-
DEBUGGER_BIN_SCRIPTS_ABS=$(foreach script,$(DEBUGGER_BIN_SCRIPTS), \
21-
$(CFG_SRC_DIR)src/etc/$(script))
16+
## GDB ##
17+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB=gdb_load_rust_pretty_printers.py \
18+
gdb_rust_pretty_printing.py
19+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS=\
20+
$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB), \
21+
$(CFG_SRC_DIR)src/etc/$(script))
22+
23+
DEBUGGER_BIN_SCRIPTS_GDB=rust-gdb
24+
DEBUGGER_BIN_SCRIPTS_GDB_ABS=\
25+
$(foreach script,$(DEBUGGER_BIN_SCRIPTS_GDB), \
26+
$(CFG_SRC_DIR)src/etc/$(script))
27+
28+
29+
## LLDB ##
30+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB=lldb_rust_formatters.py
31+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS=\
32+
$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB), \
33+
$(CFG_SRC_DIR)src/etc/$(script))
34+
35+
DEBUGGER_BIN_SCRIPTS_LLDB=rust-lldb
36+
DEBUGGER_BIN_SCRIPTS_LLDB_ABS=\
37+
$(foreach script,$(DEBUGGER_BIN_SCRIPTS_LLDB), \
38+
$(CFG_SRC_DIR)src/etc/$(script))
39+
40+
41+
## ALL ##
42+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL=$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB) \
43+
$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB)
44+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS=$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
45+
$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS)
46+
DEBUGGER_BIN_SCRIPTS_ALL=$(DEBUGGER_BIN_SCRIPTS_GDB) \
47+
$(DEBUGGER_BIN_SCRIPTS_LLDB)
48+
DEBUGGER_BIN_SCRIPTS_ALL_ABS=$(DEBUGGER_BIN_SCRIPTS_GDB_ABS) \
49+
$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
2250

23-
DEBUGGER_SCRIPTS_ALL=$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $(DEBUGGER_BIN_SCRIPTS_ABS)
2451

2552
# $(1) - the stage to copy to
2653
# $(2) - the host triple
2754
define DEF_INSTALL_DEBUGGER_SCRIPTS_HOST
2855

29-
tmp/install-debugger-scripts$(1)_H_$(2).done: $$(DEBUGGER_SCRIPTS_ALL)
56+
tmp/install-debugger-scripts$(1)_H_$(2)-gdb.done: \
57+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
58+
$$(DEBUGGER_BIN_SCRIPTS_GDB_ABS)
59+
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
60+
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
61+
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $$(HBIN$(1)_H_$(2))
62+
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
63+
$(Q)touch $$@
64+
65+
tmp/install-debugger-scripts$(1)_H_$(2)-lldb.done: \
66+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) \
67+
$$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
68+
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
69+
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
70+
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $$(HBIN$(1)_H_$(2))
71+
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
72+
$(Q)touch $$@
73+
74+
tmp/install-debugger-scripts$(1)_H_$(2)-all.done: \
75+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) \
76+
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS)
3077
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
3178
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
32-
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ABS) $$(HBIN$(1)_H_$(2))
33-
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
79+
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_ALL_ABS) $$(HBIN$(1)_H_$(2))
80+
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
3481
$(Q)touch $$@
82+
83+
tmp/install-debugger-scripts$(1)_H_$(2)-none.done:
84+
$(Q)touch $$@
85+
3586
endef
3687

3788
# Expand host make-targets for all stages
@@ -44,12 +95,36 @@ $(foreach stage,$(STAGES), \
4495
# $(3) is the host triple
4596
define DEF_INSTALL_DEBUGGER_SCRIPTS_TARGET
4697

47-
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3).done: $$(DEBUGGER_SCRIPTS_ALL)
98+
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-gdb.done: \
99+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
100+
$$(DEBUGGER_BIN_SCRIPTS_GDB_ABS)
101+
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
102+
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
103+
$(Q)install $(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
104+
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
105+
$(Q)touch $$@
106+
107+
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-lldb.done: \
108+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) \
109+
$$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
48110
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
49111
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
50-
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
51-
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
112+
$(Q)install $(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
113+
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
52114
$(Q)touch $$@
115+
116+
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-all.done: \
117+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) \
118+
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS)
119+
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
120+
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
121+
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ALL_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
122+
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
123+
$(Q)touch $$@
124+
125+
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-none.done:
126+
$(Q)touch $$@
127+
53128
endef
54129

55130
# Expand target make-targets for all stages

mk/dist.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
3535
# Source tarball
3636
######################################################################
3737

38-
PKG_TAR = dist/$(PKG_NAME).tar.gz
38+
PKG_TAR = dist/$(PKG_NAME)-src.tar.gz
3939

4040
PKG_GITMODULES := $(S)src/llvm $(S)src/compiler-rt \
4141
$(S)src/rt/hoedown $(S)src/jemalloc

mk/main.mk

+14-4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
# The version number
1616
CFG_RELEASE_NUM=0.13.0
1717

18+
# An optional number to put after the label, e.g. '2' -> '-beta2'
19+
CFG_BETA_CYCLE=
20+
1821
CFG_FILENAME_EXTRA=4e7c5e5c
1922

2023
ifeq ($(CFG_RELEASE_CHANNEL),stable)
@@ -24,12 +27,13 @@ CFG_RELEASE=$(CFG_RELEASE_NUM)
2427
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
2528
endif
2629
ifeq ($(CFG_RELEASE_CHANNEL),beta)
27-
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta
30+
# The beta channel is temporarily called 'alpha'
31+
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE)
2832
# When building beta/nightly distributables just reuse the same "beta"
2933
# name so when we upload we'll always override the previous
3034
# nighly. This doesn't actually impact the version reported by rustc -
3135
# it's just for file naming.
32-
CFG_PACKAGE_VERS=beta
36+
CFG_PACKAGE_VERS=alpha
3337
endif
3438
ifeq ($(CFG_RELEASE_CHANNEL),nightly)
3539
CFG_RELEASE=$(CFG_RELEASE_NUM)-nightly
@@ -325,6 +329,12 @@ export CFG_DISABLE_INJECT_STD_VERSION
325329
# Per-stage targets and runner
326330
######################################################################
327331

332+
# Valid setting-strings are 'all', 'none', 'gdb', 'lldb'
333+
# This 'function' will determine which debugger scripts to copy based on a
334+
# target triple. See debuggers.mk for more information.
335+
TRIPLE_TO_DEBUGGER_SCRIPT_SETTING=\
336+
$(if $(findstring windows,$(1)),none,$(if $(findstring darwin,$(1)),lldb,gdb))
337+
328338
STAGES = 0 1 2 3
329339

330340
define SREQ
@@ -357,7 +367,7 @@ else
357367
HSREQ$(1)_H_$(3) = \
358368
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
359369
$$(MKFILE_DEPS) \
360-
tmp/install-debugger-scripts$(1)_H_$(3).done
370+
tmp/install-debugger-scripts$(1)_H_$(3)-$$(call TRIPLE_TO_DEBUGGER_SCRIPT_SETTING,$(3)).done
361371
endif
362372

363373
# Prerequisites for using the stageN compiler to build target artifacts
@@ -372,7 +382,7 @@ SREQ$(1)_T_$(2)_H_$(3) = \
372382
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
373383
$$(foreach dep,$$(TARGET_CRATES), \
374384
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep)) \
375-
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3).done
385+
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-$$(call TRIPLE_TO_DEBUGGER_SCRIPT_SETTING,$(2)).done
376386

377387
# Prerequisites for a working stageN compiler and complete set of target
378388
# libraries

mk/prepare.mk

+25-3
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,27 @@ prepare-target-$(2)-host-$(3)-$(1)-$(4): prepare-maybe-clean-$(4) \
144144
$$(call PREPARE_LIB,libcompiler-rt.a),),),)
145145
endef
146146

147+
define INSTALL_GDB_DEBUGGER_SCRIPTS_COMMANDS
148+
$(Q)$(PREPARE_BIN_CMD) $(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $(PREPARE_DEST_BIN_DIR)
149+
$(Q)$(PREPARE_LIB_CMD) $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $(PREPARE_DEST_LIB_DIR)/rustlib/etc
150+
endef
151+
152+
define INSTALL_LLDB_DEBUGGER_SCRIPTS_COMMANDS
153+
$(Q)$(PREPARE_BIN_CMD) $(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $(PREPARE_DEST_BIN_DIR)
154+
$(Q)$(PREPARE_LIB_CMD) $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $(PREPARE_DEST_LIB_DIR)/rustlib/etc
155+
endef
156+
157+
define INSTALL_NO_DEBUGGER_SCRIPTS_COMMANDS
158+
$(Q)echo "No debugger scripts will be installed for host $(PREPARE_HOST)"
159+
endef
160+
161+
# $(1) is PREPARE_HOST
162+
INSTALL_DEBUGGER_SCRIPT_COMMANDS=$(if $(findstring windows,$(1)),\
163+
$(INSTALL_NO_DEBUGGER_SCRIPTS_COMMANDS),\
164+
$(if $(findstring darwin,$(1)),\
165+
$(INSTALL_LLDB_DEBUGGER_SCRIPTS_COMMANDS),\
166+
$(INSTALL_GDB_DEBUGGER_SCRIPTS_COMMANDS)))
167+
147168
define DEF_PREPARE
148169

149170
prepare-base-$(1): PREPARE_SOURCE_DIR=$$(PREPARE_HOST)/stage$$(PREPARE_STAGE)
@@ -170,9 +191,10 @@ prepare-host-dirs-$(1): prepare-maybe-clean-$(1)
170191
$$(call PREPARE_DIR,$$(PREPARE_DEST_LIB_DIR)/rustlib/etc)
171192
$$(call PREPARE_DIR,$$(PREPARE_DEST_MAN_DIR))
172193

173-
prepare-debugger-scripts-$(1): prepare-host-dirs-$(1) $(DEBUGGER_SCRIPTS_ALL)
174-
$$(Q)$$(PREPARE_BIN_CMD) $(DEBUGGER_BIN_SCRIPTS_ABS) $$(PREPARE_DEST_BIN_DIR)
175-
$$(Q)$$(PREPARE_LIB_CMD) $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(PREPARE_DEST_LIB_DIR)/rustlib/etc
194+
prepare-debugger-scripts-$(1): prepare-host-dirs-$(1) \
195+
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS) \
196+
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS)
197+
$$(call INSTALL_DEBUGGER_SCRIPT_COMMANDS,$$(PREPARE_HOST))
176198

177199
$$(foreach tool,$$(PREPARE_TOOLS), \
178200
$$(foreach host,$$(CFG_HOST), \

src/compiletest/runtest.rs

+7-36
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ use std::io::process;
3232
use std::io::timer;
3333
use std::io;
3434
use std::os;
35+
use std::iter::repeat;
3536
use std::str;
3637
use std::string::String;
3738
use std::thread::Thread;
@@ -367,7 +368,6 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
367368
let DebuggerCommands {
368369
commands,
369370
check_lines,
370-
use_gdb_pretty_printer,
371371
breakpoint_lines
372372
} = parse_debugger_commands(testfile, "gdb");
373373
let mut cmds = commands.connect("\n");
@@ -521,16 +521,11 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
521521
if header::gdb_version_to_int(version.as_slice()) >
522522
header::gdb_version_to_int("7.4") {
523523
// Add the directory containing the pretty printers to
524-
// GDB's script auto loading safe path ...
524+
// GDB's script auto loading safe path
525525
script_str.push_str(
526526
format!("add-auto-load-safe-path {}\n",
527527
rust_pp_module_abs_path.replace("\\", "\\\\").as_slice())
528528
.as_slice());
529-
// ... and also the test directory
530-
script_str.push_str(
531-
format!("add-auto-load-safe-path {}\n",
532-
config.build_base.as_str().unwrap().replace("\\", "\\\\"))
533-
.as_slice());
534529
}
535530
}
536531
_ => {
@@ -543,6 +538,9 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
543538
// pretty printing, it just tells GDB to print values on one line:
544539
script_str.push_str("set print pretty off\n");
545540

541+
// Add the pretty printer directory to GDB's source-file search path
542+
script_str.push_str(format!("directory {}\n", rust_pp_module_abs_path)[]);
543+
546544
// Load the target executable
547545
script_str.push_str(format!("file {}\n",
548546
exe_file.as_str().unwrap().replace("\\", "\\\\"))
@@ -564,12 +562,6 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
564562
script_str.as_slice(),
565563
"debugger.script");
566564

567-
if use_gdb_pretty_printer {
568-
// Only emit the gdb auto-loading script if pretty printers
569-
// should actually be loaded
570-
dump_gdb_autoload_script(config, testfile);
571-
}
572-
573565
// run debugger script with gdb
574566
#[cfg(windows)]
575567
fn debugger() -> String {
@@ -611,19 +603,6 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
611603
}
612604

613605
check_debugger_output(&debugger_run_result, check_lines.as_slice());
614-
615-
fn dump_gdb_autoload_script(config: &Config, testfile: &Path) {
616-
let mut script_path = output_base_name(config, testfile);
617-
let mut script_file_name = script_path.filename().unwrap().to_vec();
618-
script_file_name.push_all("-gdb.py".as_bytes());
619-
script_path.set_filename(script_file_name.as_slice());
620-
621-
let script_content = "import gdb_rust_pretty_printing\n\
622-
gdb_rust_pretty_printing.register_printers(gdb.current_objfile())\n"
623-
.as_bytes();
624-
625-
File::create(&script_path).write(script_content).unwrap();
626-
}
627606
}
628607

629608
fn find_rust_src_root(config: &Config) -> Option<Path> {
@@ -781,7 +760,6 @@ struct DebuggerCommands {
781760
commands: Vec<String>,
782761
check_lines: Vec<String>,
783762
breakpoint_lines: Vec<uint>,
784-
use_gdb_pretty_printer: bool
785763
}
786764

787765
fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
@@ -794,7 +772,6 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
794772
let mut breakpoint_lines = vec!();
795773
let mut commands = vec!();
796774
let mut check_lines = vec!();
797-
let mut use_gdb_pretty_printer = false;
798775
let mut counter = 1;
799776
let mut reader = BufferedReader::new(File::open(file_path).unwrap());
800777
for line in reader.lines() {
@@ -804,10 +781,6 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
804781
breakpoint_lines.push(counter);
805782
}
806783

807-
if line.as_slice().contains("gdb-use-pretty-printer") {
808-
use_gdb_pretty_printer = true;
809-
}
810-
811784
header::parse_name_value_directive(
812785
line.as_slice(),
813786
command_directive.as_slice()).map(|cmd| {
@@ -832,7 +805,6 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
832805
commands: commands,
833806
check_lines: check_lines,
834807
breakpoint_lines: breakpoint_lines,
835-
use_gdb_pretty_printer: use_gdb_pretty_printer,
836808
}
837809
}
838810

@@ -976,8 +948,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
976948
proc_res: &ProcRes) {
977949

978950
// true if we found the error in question
979-
let mut found_flags = Vec::from_elem(
980-
expected_errors.len(), false);
951+
let mut found_flags: Vec<_> = repeat(false).take(expected_errors.len()).collect();
981952

982953
if proc_res.status.success() {
983954
fatal("process did not return an error status");
@@ -1337,7 +1308,7 @@ fn make_run_args(config: &Config, props: &TestProps, testfile: &Path) ->
13371308
// Add the arguments in the run_flags directive
13381309
args.extend(split_maybe_args(&props.run_flags).into_iter());
13391310

1340-
let prog = args.remove(0).unwrap();
1311+
let prog = args.remove(0);
13411312
return ProcArgs {
13421313
prog: prog,
13431314
args: args,

0 commit comments

Comments
 (0)