Skip to content

Commit 44bbc88

Browse files
committed
---
yaml --- r: 152035 b: refs/heads/try2 c: 3f8cc16 h: refs/heads/master i: 152033: b834904 152031: f7b19a1 v: v3
1 parent c0a66e3 commit 44bbc88

File tree

498 files changed

+3414
-4185
lines changed

Some content is hidden

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

498 files changed

+3414
-4185
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: a7ab73344dcf3bf0973317ae165f751f6bb42766
8+
refs/heads/try2: 3f8cc1683bc08d15986c617bced79a1f3eb197d2
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/docs.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
DOCS := index intro tutorial guide-ffi guide-macros guide-lifetimes \
3030
guide-tasks guide-container guide-pointers guide-testing \
3131
guide-runtime complement-bugreport complement-cheatsheet \
32-
complement-lang-faq complement-design-faq complement-project-faq rust \
33-
rustdoc guide-unsafe
32+
complement-lang-faq complement-project-faq rust rustdoc \
33+
guide-unsafe
3434

3535
PDF_DOCS := tutorial rust
3636

branches/try2/mk/platform.mk

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ endef
9797
$(foreach cvar,CC CXX CPP CFLAGS CXXFLAGS CPPFLAGS,\
9898
$(eval $(call SET_FROM_CFG,$(cvar))))
9999

100+
ifeq ($(CFG_USING_CLANG),1)
101+
# The -Qunused-arguments sidesteps spurious warnings from clang
102+
CFLAGS += -Qunused-arguments
103+
CXXFLAGS += -Qunused-arguments
104+
CPPFLAGS += -Qunused-arguments
105+
endif
106+
100107
CFG_RLIB_GLOB=lib$(1)-*.rlib
101108

102109
# x86_64-unknown-linux-gnu configuration
@@ -509,21 +516,6 @@ CFG_LDPATH_x86_64-unknown-freebsd :=
509516
CFG_RUN_x86_64-unknown-freebsd=$(2)
510517
CFG_RUN_TARG_x86_64-unknown-freebsd=$(call CFG_RUN_x86_64-unknown-freebsd,,$(2))
511518

512-
513-
# The -Qunused-arguments sidesteps spurious warnings from clang
514-
define FILTER_FLAGS
515-
ifeq ($$(CFG_USING_CLANG),1)
516-
ifneq ($(findstring clang,$$(shell $(CC_$(1)) -v)),)
517-
CFG_GCCISH_CFLAGS_$(1) += -Qunused-arguments
518-
CFG_GCCISH_CXXFLAGS_$(1) += -Qunused-arguments
519-
endif
520-
endif
521-
endef
522-
523-
$(foreach target,$(CFG_TARGET),\
524-
$(eval $(call FILTER_FLAGS,$(target))))
525-
526-
527519
ifeq ($(CFG_CCACHE_CPP2),1)
528520
CCACHE_CPP2=1
529521
export CCACHE_CPP

branches/try2/src/compiletest/common.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ impl fmt::Show for Mode {
5656
#[deriving(Clone)]
5757
pub struct Config {
5858
// The library paths required for running the compiler
59-
pub compile_lib_path: String,
59+
pub compile_lib_path: StrBuf,
6060

6161
// The library paths required for running compiled programs
62-
pub run_lib_path: String,
62+
pub run_lib_path: StrBuf,
6363

6464
// The rustc executable
6565
pub rustc_path: Path,
@@ -80,7 +80,7 @@ pub struct Config {
8080
pub aux_base: Path,
8181

8282
// The name of the stage being built (stage1, etc)
83-
pub stage_id: String,
83+
pub stage_id: StrBuf,
8484

8585
// The test mode, compile-fail, run-fail, run-pass
8686
pub mode: Mode,
@@ -113,37 +113,37 @@ pub struct Config {
113113

114114
// A command line to prefix program execution with,
115115
// for running under valgrind
116-
pub runtool: Option<String>,
116+
pub runtool: Option<StrBuf>,
117117

118118
// Flags to pass to the compiler when building for the host
119-
pub host_rustcflags: Option<String>,
119+
pub host_rustcflags: Option<StrBuf>,
120120

121121
// Flags to pass to the compiler when building for the target
122-
pub target_rustcflags: Option<String>,
122+
pub target_rustcflags: Option<StrBuf>,
123123

124124
// Run tests using the JIT
125125
pub jit: bool,
126126

127127
// Target system to be tested
128-
pub target: String,
128+
pub target: StrBuf,
129129

130130
// Host triple for the compiler being invoked
131-
pub host: String,
131+
pub host: StrBuf,
132132

133133
// Path to the android tools
134134
pub android_cross_path: Path,
135135

136136
// Extra parameter to run adb on arm-linux-androideabi
137-
pub adb_path: String,
137+
pub adb_path: StrBuf,
138138

139139
// Extra parameter to run test sute on arm-linux-androideabi
140-
pub adb_test_dir: String,
140+
pub adb_test_dir: StrBuf,
141141

142142
// status whether android device available or not
143143
pub adb_device_status: bool,
144144

145145
// the path containing LLDB's Python module
146-
pub lldb_python_dir: Option<String>,
146+
pub lldb_python_dir: Option<StrBuf>,
147147

148148
// Explain what's going on
149149
pub verbose: bool

branches/try2/src/compiletest/compiletest.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn main() {
5656
run_tests(&config);
5757
}
5858

59-
pub fn parse_config(args: Vec<String> ) -> Config {
59+
pub fn parse_config(args: Vec<StrBuf> ) -> Config {
6060

6161
let groups : Vec<getopts::OptGroup> =
6262
vec!(reqopt("", "compile-lib-path", "path to host shared libraries", "PATH"),
@@ -225,14 +225,14 @@ pub fn log_config(config: &Config) {
225225
logv(c, format_strbuf!("\n"));
226226
}
227227

228-
pub fn opt_str<'a>(maybestr: &'a Option<String>) -> &'a str {
228+
pub fn opt_str<'a>(maybestr: &'a Option<StrBuf>) -> &'a str {
229229
match *maybestr {
230230
None => "(none)",
231231
Some(ref s) => s.as_slice(),
232232
}
233233
}
234234

235-
pub fn opt_str2(maybestr: Option<String>) -> String {
235+
pub fn opt_str2(maybestr: Option<StrBuf>) -> StrBuf {
236236
match maybestr {
237237
None => "(none)".to_strbuf(),
238238
Some(s) => s,
@@ -352,7 +352,7 @@ pub fn make_test(config: &Config, testfile: &Path, f: || -> test::TestFn)
352352
pub fn make_test_name(config: &Config, testfile: &Path) -> test::TestName {
353353

354354
// Try to elide redundant long paths
355-
fn shorten(path: &Path) -> String {
355+
fn shorten(path: &Path) -> StrBuf {
356356
let filename = path.filename_str();
357357
let p = path.dir_path();
358358
let dir = p.filename_str();

branches/try2/src/compiletest/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ use regex::Regex;
1313

1414
pub struct ExpectedError {
1515
pub line: uint,
16-
pub kind: String,
17-
pub msg: String,
16+
pub kind: StrBuf,
17+
pub msg: StrBuf,
1818
}
1919

2020
pub static EXPECTED_PATTERN : &'static str = r"//~(?P<adjusts>\^*)\s*(?P<kind>\S*)\s*(?P<msg>.*)";

branches/try2/src/compiletest/header.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ use util;
1414

1515
pub struct TestProps {
1616
// Lines that should be expected, in order, on standard out
17-
pub error_patterns: Vec<String> ,
17+
pub error_patterns: Vec<StrBuf> ,
1818
// Extra flags to pass to the compiler
19-
pub compile_flags: Option<String>,
19+
pub compile_flags: Option<StrBuf>,
2020
// Extra flags to pass when the compiled code is run (such as --bench)
21-
pub run_flags: Option<String>,
21+
pub run_flags: Option<StrBuf>,
2222
// If present, the name of a file that this test should match when
2323
// pretty-printed
2424
pub pp_exact: Option<Path>,
2525
// Modules from aux directory that should be compiled
26-
pub aux_builds: Vec<String> ,
26+
pub aux_builds: Vec<StrBuf> ,
2727
// Environment settings to use during execution
28-
pub exec_env: Vec<(String,String)> ,
28+
pub exec_env: Vec<(StrBuf,StrBuf)> ,
2929
// Lines to check if they appear in the expected debugger output
30-
pub check_lines: Vec<String> ,
30+
pub check_lines: Vec<StrBuf> ,
3131
// Flag to force a crate to be built with the host architecture
3232
pub force_host: bool,
3333
// Check stdout for error-pattern output as well as stderr
@@ -119,10 +119,10 @@ pub fn load_props(testfile: &Path) -> TestProps {
119119
}
120120

121121
pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
122-
fn ignore_target(config: &Config) -> String {
122+
fn ignore_target(config: &Config) -> StrBuf {
123123
format_strbuf!("ignore-{}", util::get_os(config.target.as_slice()))
124124
}
125-
fn ignore_stage(config: &Config) -> String {
125+
fn ignore_stage(config: &Config) -> StrBuf {
126126
format_strbuf!("ignore-{}",
127127
config.stage_id.as_slice().split('-').next().unwrap())
128128
}
@@ -169,23 +169,23 @@ fn iter_header(testfile: &Path, it: |&str| -> bool) -> bool {
169169
return true;
170170
}
171171

172-
fn parse_error_pattern(line: &str) -> Option<String> {
172+
fn parse_error_pattern(line: &str) -> Option<StrBuf> {
173173
parse_name_value_directive(line, "error-pattern".to_strbuf())
174174
}
175175

176-
fn parse_aux_build(line: &str) -> Option<String> {
176+
fn parse_aux_build(line: &str) -> Option<StrBuf> {
177177
parse_name_value_directive(line, "aux-build".to_strbuf())
178178
}
179179

180-
fn parse_compile_flags(line: &str) -> Option<String> {
180+
fn parse_compile_flags(line: &str) -> Option<StrBuf> {
181181
parse_name_value_directive(line, "compile-flags".to_strbuf())
182182
}
183183

184-
fn parse_run_flags(line: &str) -> Option<String> {
184+
fn parse_run_flags(line: &str) -> Option<StrBuf> {
185185
parse_name_value_directive(line, "run-flags".to_strbuf())
186186
}
187187

188-
fn parse_check_line(line: &str) -> Option<String> {
188+
fn parse_check_line(line: &str) -> Option<StrBuf> {
189189
parse_name_value_directive(line, "check".to_strbuf())
190190
}
191191

@@ -205,10 +205,10 @@ fn parse_no_pretty_expanded(line: &str) -> bool {
205205
parse_name_directive(line, "no-pretty-expanded")
206206
}
207207

208-
fn parse_exec_env(line: &str) -> Option<(String, String)> {
208+
fn parse_exec_env(line: &str) -> Option<(StrBuf, StrBuf)> {
209209
parse_name_value_directive(line, "exec-env".to_strbuf()).map(|nv| {
210210
// nv is either FOO or FOO=BAR
211-
let mut strs: Vec<String> = nv.as_slice()
211+
let mut strs: Vec<StrBuf> = nv.as_slice()
212212
.splitn('=', 1)
213213
.map(|s| s.to_strbuf())
214214
.collect();
@@ -241,8 +241,8 @@ fn parse_name_directive(line: &str, directive: &str) -> bool {
241241
line.contains(directive)
242242
}
243243

244-
pub fn parse_name_value_directive(line: &str, directive: String)
245-
-> Option<String> {
244+
pub fn parse_name_value_directive(line: &str, directive: StrBuf)
245+
-> Option<StrBuf> {
246246
let keycolon = format_strbuf!("{}:", directive);
247247
match line.find_str(keycolon.as_slice()) {
248248
Some(colon) => {

branches/try2/src/compiletest/procsrv.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::str;
1313
use std::io::process::{ProcessExit, Command, Process, ProcessOutput};
1414
use std::unstable::dynamic_lib::DynamicLibrary;
1515

16-
fn target_env(lib_path: &str, prog: &str) -> Vec<(String, String)> {
16+
fn target_env(lib_path: &str, prog: &str) -> Vec<(StrBuf, StrBuf)> {
1717
let prog = if cfg!(windows) {prog.slice_to(prog.len() - 4)} else {prog};
1818
let mut aux_path = prog.to_strbuf();
1919
aux_path.push_str(".libaux");
@@ -26,7 +26,7 @@ fn target_env(lib_path: &str, prog: &str) -> Vec<(String, String)> {
2626

2727
// Remove the previous dylib search path var
2828
let var = DynamicLibrary::envvar();
29-
let mut env: Vec<(String,String)> =
29+
let mut env: Vec<(StrBuf,StrBuf)> =
3030
os::env().move_iter().map(|(a,b)|(a.to_strbuf(), b.to_strbuf())).collect();
3131
match env.iter().position(|&(ref k, _)| k.as_slice() == var) {
3232
Some(i) => { env.remove(i); }
@@ -40,13 +40,13 @@ fn target_env(lib_path: &str, prog: &str) -> Vec<(String, String)> {
4040
return env;
4141
}
4242

43-
pub struct Result {pub status: ProcessExit, pub out: String, pub err: String}
43+
pub struct Result {pub status: ProcessExit, pub out: StrBuf, pub err: StrBuf}
4444

4545
pub fn run(lib_path: &str,
4646
prog: &str,
47-
args: &[String],
48-
env: Vec<(String, String)> ,
49-
input: Option<String>) -> Option<Result> {
47+
args: &[StrBuf],
48+
env: Vec<(StrBuf, StrBuf)> ,
49+
input: Option<StrBuf>) -> Option<Result> {
5050

5151
let env = env.clone().append(target_env(lib_path, prog).as_slice());
5252
match Command::new(prog).args(args).env(env.as_slice()).spawn() {
@@ -69,9 +69,9 @@ pub fn run(lib_path: &str,
6969

7070
pub fn run_background(lib_path: &str,
7171
prog: &str,
72-
args: &[String],
73-
env: Vec<(String, String)> ,
74-
input: Option<String>) -> Option<Process> {
72+
args: &[StrBuf],
73+
env: Vec<(StrBuf, StrBuf)> ,
74+
input: Option<StrBuf>) -> Option<Process> {
7575

7676
let env = env.clone().append(target_env(lib_path, prog).as_slice());
7777
match Command::new(prog).args(args).env(env.as_slice()).spawn() {

0 commit comments

Comments
 (0)