Skip to content

Commit be3804e

Browse files
committed
---
yaml --- r: 120718 b: refs/heads/dist-snap c: 73dac7e h: refs/heads/master v: v3
1 parent 94c9d7a commit be3804e

File tree

584 files changed

+7510
-5939
lines changed

Some content is hidden

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

584 files changed

+7510
-5939
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 0cae84959568859f946dffb1e9d9e1d43e05ae6b
9+
refs/heads/dist-snap: 73dac7e4e61aa88cfc98433b61ba131b38af978d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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-project-faq rust rustdoc \
33-
guide-unsafe
32+
complement-lang-faq complement-design-faq complement-project-faq rust \
33+
rustdoc guide-unsafe
3434

3535
PDF_DOCS := tutorial rust
3636

branches/dist-snap/mk/platform.mk

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,6 @@ 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-
107100
CFG_RLIB_GLOB=lib$(1)-*.rlib
108101

109102
# x86_64-unknown-linux-gnu configuration
@@ -516,6 +509,21 @@ CFG_LDPATH_x86_64-unknown-freebsd :=
516509
CFG_RUN_x86_64-unknown-freebsd=$(2)
517510
CFG_RUN_TARG_x86_64-unknown-freebsd=$(call CFG_RUN_x86_64-unknown-freebsd,,$(2))
518511

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+
519527
ifeq ($(CFG_CCACHE_CPP2),1)
520528
CCACHE_CPP2=1
521529
export CCACHE_CPP

branches/dist-snap/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: StrBuf,
59+
pub compile_lib_path: String,
6060

6161
// The library paths required for running compiled programs
62-
pub run_lib_path: StrBuf,
62+
pub run_lib_path: String,
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: StrBuf,
83+
pub stage_id: String,
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<StrBuf>,
116+
pub runtool: Option<String>,
117117

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

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

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

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

130130
// Host triple for the compiler being invoked
131-
pub host: StrBuf,
131+
pub host: String,
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: StrBuf,
137+
pub adb_path: String,
138138

139139
// Extra parameter to run test sute on arm-linux-androideabi
140-
pub adb_test_dir: StrBuf,
140+
pub adb_test_dir: String,
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<StrBuf>,
146+
pub lldb_python_dir: Option<String>,
147147

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

branches/dist-snap/src/compiletest/compiletest.rs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ fn start(argc: int, argv: **u8) -> int {
5050
pub fn main() {
5151
let args = os::args();
5252
let config = parse_config(args.move_iter()
53-
.map(|x| x.to_strbuf())
53+
.map(|x| x.to_string())
5454
.collect());
5555
log_config(&config);
5656
run_tests(&config);
5757
}
5858

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

6161
let groups : Vec<getopts::OptGroup> =
6262
vec!(reqopt("", "compile-lib-path", "path to host shared libraries", "PATH"),
@@ -134,15 +134,15 @@ pub fn parse_config(args: Vec<StrBuf> ) -> Config {
134134
Config {
135135
compile_lib_path: matches.opt_str("compile-lib-path")
136136
.unwrap()
137-
.to_strbuf(),
138-
run_lib_path: matches.opt_str("run-lib-path").unwrap().to_strbuf(),
137+
.to_string(),
138+
run_lib_path: matches.opt_str("run-lib-path").unwrap().to_string(),
139139
rustc_path: opt_path(matches, "rustc-path"),
140140
clang_path: matches.opt_str("clang-path").map(|s| Path::new(s)),
141141
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| Path::new(s)),
142142
src_base: opt_path(matches, "src-base"),
143143
build_base: opt_path(matches, "build-base"),
144144
aux_base: opt_path(matches, "aux-base"),
145-
stage_id: matches.opt_str("stage-id").unwrap().to_strbuf(),
145+
stage_id: matches.opt_str("stage-id").unwrap().to_string(),
146146
mode: FromStr::from_str(matches.opt_str("mode")
147147
.unwrap()
148148
.as_slice()).expect("invalid mode"),
@@ -156,32 +156,32 @@ pub fn parse_config(args: Vec<StrBuf> ) -> Config {
156156
ratchet_noise_percent:
157157
matches.opt_str("ratchet-noise-percent")
158158
.and_then(|s| from_str::<f64>(s.as_slice())),
159-
runtool: matches.opt_str("runtool").map(|x| x.to_strbuf()),
159+
runtool: matches.opt_str("runtool").map(|x| x.to_string()),
160160
host_rustcflags: matches.opt_str("host-rustcflags")
161-
.map(|x| x.to_strbuf()),
161+
.map(|x| x.to_string()),
162162
target_rustcflags: matches.opt_str("target-rustcflags")
163-
.map(|x| x.to_strbuf()),
163+
.map(|x| x.to_string()),
164164
jit: matches.opt_present("jit"),
165-
target: opt_str2(matches.opt_str("target").map(|x| x.to_strbuf())),
166-
host: opt_str2(matches.opt_str("host").map(|x| x.to_strbuf())),
165+
target: opt_str2(matches.opt_str("target").map(|x| x.to_string())),
166+
host: opt_str2(matches.opt_str("host").map(|x| x.to_string())),
167167
android_cross_path: opt_path(matches, "android-cross-path"),
168168
adb_path: opt_str2(matches.opt_str("adb-path")
169-
.map(|x| x.to_strbuf())),
169+
.map(|x| x.to_string())),
170170
adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")
171-
.map(|x| x.to_strbuf())),
171+
.map(|x| x.to_string())),
172172
adb_device_status:
173173
"arm-linux-androideabi" ==
174174
opt_str2(matches.opt_str("target")
175-
.map(|x| x.to_strbuf())).as_slice() &&
175+
.map(|x| x.to_string())).as_slice() &&
176176
"(none)" !=
177177
opt_str2(matches.opt_str("adb-test-dir")
178-
.map(|x| x.to_strbuf())).as_slice() &&
178+
.map(|x| x.to_string())).as_slice() &&
179179
!opt_str2(matches.opt_str("adb-test-dir")
180-
.map(|x| x.to_strbuf())).is_empty(),
180+
.map(|x| x.to_string())).is_empty(),
181181
lldb_python_dir: matches.opt_str("lldb-python-dir")
182-
.map(|x| x.to_strbuf()),
182+
.map(|x| x.to_string()),
183183
test_shard: test::opt_shard(matches.opt_str("test-shard")
184-
.map(|x| x.to_strbuf())),
184+
.map(|x| x.to_string())),
185185
verbose: matches.opt_present("verbose")
186186
}
187187
}
@@ -201,7 +201,7 @@ pub fn log_config(config: &Config) {
201201
opt_str(&config.filter
202202
.as_ref()
203203
.map(|re| {
204-
re.to_str().into_strbuf()
204+
re.to_str().into_string()
205205
}))));
206206
logv(c, format_strbuf!("runtool: {}", opt_str(&config.runtool)));
207207
logv(c, format_strbuf!("host-rustcflags: {}",
@@ -218,23 +218,23 @@ pub fn log_config(config: &Config) {
218218
logv(c, format_strbuf!("adb_device_status: {}",
219219
config.adb_device_status));
220220
match config.test_shard {
221-
None => logv(c, "test_shard: (all)".to_strbuf()),
221+
None => logv(c, "test_shard: (all)".to_string()),
222222
Some((a,b)) => logv(c, format_strbuf!("test_shard: {}.{}", a, b))
223223
}
224224
logv(c, format_strbuf!("verbose: {}", config.verbose));
225225
logv(c, format_strbuf!("\n"));
226226
}
227227

228-
pub fn opt_str<'a>(maybestr: &'a Option<StrBuf>) -> &'a str {
228+
pub fn opt_str<'a>(maybestr: &'a Option<String>) -> &'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<StrBuf>) -> StrBuf {
235+
pub fn opt_str2(maybestr: Option<String>) -> String {
236236
match maybestr {
237-
None => "(none)".to_strbuf(),
237+
None => "(none)".to_string(),
238238
Some(s) => s,
239239
}
240240
}
@@ -314,10 +314,10 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
314314
// Pretty-printer does not work with .rc files yet
315315
let valid_extensions =
316316
match config.mode {
317-
Pretty => vec!(".rs".to_owned()),
318-
_ => vec!(".rc".to_owned(), ".rs".to_owned())
317+
Pretty => vec!(".rs".to_string()),
318+
_ => vec!(".rc".to_string(), ".rs".to_string())
319319
};
320-
let invalid_prefixes = vec!(".".to_owned(), "#".to_owned(), "~".to_owned());
320+
let invalid_prefixes = vec!(".".to_string(), "#".to_string(), "~".to_string());
321321
let name = testfile.filename_str().unwrap();
322322

323323
let mut valid = false;
@@ -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) -> StrBuf {
355+
fn shorten(path: &Path) -> String {
356356
let filename = path.filename_str();
357357
let p = path.dir_path();
358358
let dir = p.filename_str();
@@ -367,7 +367,7 @@ pub fn make_test_name(config: &Config, testfile: &Path) -> test::TestName {
367367
pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
368368
let config = (*config).clone();
369369
// FIXME (#9639): This needs to handle non-utf8 paths
370-
let testfile = testfile.as_str().unwrap().to_strbuf();
370+
let testfile = testfile.as_str().unwrap().to_string();
371371
test::DynTestFn(proc() {
372372
runtest::run(config, testfile)
373373
})
@@ -376,7 +376,7 @@ pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
376376
pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
377377
let config = (*config).clone();
378378
// FIXME (#9639): This needs to handle non-utf8 paths
379-
let testfile = testfile.as_str().unwrap().to_strbuf();
379+
let testfile = testfile.as_str().unwrap().to_string();
380380
test::DynMetricFn(proc(mm) {
381381
runtest::run_metrics(config, testfile, mm)
382382
})

branches/dist-snap/src/compiletest/errors.rs

Lines changed: 4 additions & 4 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: StrBuf,
17-
pub msg: StrBuf,
16+
pub kind: String,
17+
pub msg: String,
1818
}
1919

2020
pub static EXPECTED_PATTERN : &'static str = r"//~(?P<adjusts>\^*)\s*(?P<kind>\S*)\s*(?P<msg>.*)";
@@ -31,8 +31,8 @@ pub fn load_errors(re: &Regex, testfile: &Path) -> Vec<ExpectedError> {
3131
fn parse_expected(line_num: uint, line: &str, re: &Regex) -> Option<ExpectedError> {
3232
re.captures(line).and_then(|caps| {
3333
let adjusts = caps.name("adjusts").len();
34-
let kind = caps.name("kind").to_ascii().to_lower().into_str().to_strbuf();
35-
let msg = caps.name("msg").trim().to_strbuf();
34+
let kind = caps.name("kind").to_ascii().to_lower().into_str().to_string();
35+
let msg = caps.name("msg").trim().to_string();
3636

3737
debug!("line={} kind={} msg={}", line_num, kind, msg);
3838
Some(ExpectedError {

0 commit comments

Comments
 (0)