Skip to content

Commit 49a520c

Browse files
committed
Resolve merge conflicts
Conflicts: src/libstd/sys/unix/process.rs
2 parents 0b8f6f9 + 3b2ed14 commit 49a520c

File tree

1,186 files changed

+13188
-12115
lines changed

Some content is hidden

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

1,186 files changed

+13188
-12115
lines changed

COPYRIGHT

+4-16
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ The following third party packages are included, and carry
2323
their own copyright notices and license terms:
2424

2525
* Two header files that are part of the Valgrind
26-
package. These files are found at src/rt/vg/valgrind.h and
27-
src/rt/vg/memcheck.h, within this distribution. These files
26+
package. These files are found at src/rt/valgrind/valgrind.h and
27+
src/rt/valgrind/memcheck.h, within this distribution. These files
2828
are redistributed under the following terms, as noted in
2929
them:
3030

31-
for src/rt/vg/valgrind.h:
31+
for src/rt/valgrind/valgrind.h:
3232

3333
This file is part of Valgrind, a dynamic binary
3434
instrumentation framework.
@@ -74,7 +74,7 @@ their own copyright notices and license terms:
7474
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
7575
OF SUCH DAMAGE.
7676

77-
for src/rt/vg/memcheck.h:
77+
for src/rt/valgrind/memcheck.h:
7878

7979
This file is part of MemCheck, a heavyweight Valgrind
8080
tool for detecting memory errors.
@@ -120,18 +120,6 @@ their own copyright notices and license terms:
120120
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
121121
OF SUCH DAMAGE.
122122

123-
* The auxiliary file src/etc/pkg/modpath.iss contains a
124-
library routine compiled, by Inno Setup, into the Windows
125-
installer binary. This file is licensed under the LGPL,
126-
version 3, but, in our legal interpretation, this does not
127-
affect the aggregate "collected work" license of the Rust
128-
distribution (MIT/ASL2) nor any other components of it. We
129-
believe that the terms governing distribution of the
130-
binary Windows installer built from modpath.iss are
131-
therefore LGPL, but not the terms governing distribution
132-
of any of the files installed by such an installer (such
133-
as the Rust compiler or runtime libraries themselves).
134-
135123
* The src/rt/miniz.c file, carrying an implementation of
136124
RFC1950/RFC1951 DEFLATE, by Rich Geldreich
137125
<[email protected]>. All uses of this file are

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,14 @@ There is a lot more documentation in the [wiki].
110110

111111
The Rust community congregates in a few places:
112112

113-
* [StackOverflow] - Get help here.
114-
* [/r/rust] - General discussion.
113+
* [StackOverflow] - Direct questions about using the language here.
114+
* [users.rust-lang.org] - General discussion, broader questions.
115115
* [internals.rust-lang.org] - For development of the Rust language itself.
116+
* [/r/rust] - News and general discussion.
116117

117118
[StackOverflow]: http://stackoverflow.com/questions/tagged/rust
118119
[/r/rust]: http://reddit.com/r/rust
120+
[users.rust-lang.org]: http://users.rust-lang.org/
119121
[internals.rust-lang.org]: http://internals.rust-lang.org/
120122

121123
## License

configure

+4
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,10 @@ case $CFG_OSTYPE in
374374
CFG_OSTYPE=unknown-dragonfly
375375
;;
376376

377+
OpenBSD)
378+
CFG_OSTYPE=unknown-openbsd
379+
;;
380+
377381
Darwin)
378382
CFG_OSTYPE=apple-darwin
379383
;;

mk/cfg/x86_64-unknown-openbsd.mk

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# x86_64-pc-openbsd-elf configuration
2+
CC_x86_64-unknown-openbsd=$(CC)
3+
CXX_x86_64-unknown-openbsd=$(CXX)
4+
CPP_x86_64-unknown-openbsd=$(CPP)
5+
AR_x86_64-unknown-openbsd=$(AR)
6+
CFG_LIB_NAME_x86_64-unknown-openbsd=lib$(1).so
7+
CFG_STATIC_LIB_NAME_x86_64-unknown-openbsd=lib$(1).a
8+
CFG_LIB_GLOB_x86_64-unknown-openbsd=lib$(1)-*.so
9+
CFG_LIB_DSYM_GLOB_x86_64-unknown-openbsd=$(1)-*.dylib.dSYM
10+
CFG_JEMALLOC_CFLAGS_x86_64-unknown-openbsd := -m64 -I/usr/include $(CFLAGS)
11+
CFG_GCCISH_CFLAGS_x86_64-unknown-openbsd := -Wall -Werror -g -fPIC -m64 -I/usr/include $(CFLAGS)
12+
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-openbsd := -shared -fPIC -g -pthread -m64
13+
CFG_GCCISH_DEF_FLAG_x86_64-unknown-openbsd := -Wl,--export-dynamic,--dynamic-list=
14+
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-openbsd := -Wl,-whole-archive
15+
CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-openbsd := -Wl,-no-whole-archive
16+
CFG_DEF_SUFFIX_x86_64-unknown-openbsd := .bsd.def
17+
CFG_LLC_FLAGS_x86_64-unknown-openbsd :=
18+
CFG_INSTALL_NAME_x86_64-unknown-openbsd =
19+
CFG_EXE_SUFFIX_x86_64-unknown-openbsd :=
20+
CFG_WINDOWSY_x86_64-unknown-openbsd :=
21+
CFG_UNIXY_x86_64-unknown-openbsd := 1
22+
CFG_PATH_MUNGE_x86_64-unknown-openbsd :=
23+
CFG_LDPATH_x86_64-unknown-openbsd :=
24+
CFG_RUN_x86_64-unknown-openbsd=$(2)
25+
CFG_RUN_TARG_x86_64-unknown-openbsd=$(call CFG_RUN_x86_64-unknown-openbsd,,$(2))
26+
CFG_GNU_TRIPLE_x86_64-unknown-openbsd := x86_64-unknown-openbsd

src/compiletest/common.rs

+11-10
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,18 @@ pub enum Mode {
2525
}
2626

2727
impl FromStr for Mode {
28-
fn from_str(s: &str) -> Option<Mode> {
28+
type Err = ();
29+
fn from_str(s: &str) -> Result<Mode, ()> {
2930
match s {
30-
"compile-fail" => Some(CompileFail),
31-
"run-fail" => Some(RunFail),
32-
"run-pass" => Some(RunPass),
33-
"run-pass-valgrind" => Some(RunPassValgrind),
34-
"pretty" => Some(Pretty),
35-
"debuginfo-lldb" => Some(DebugInfoLldb),
36-
"debuginfo-gdb" => Some(DebugInfoGdb),
37-
"codegen" => Some(Codegen),
38-
_ => None,
31+
"compile-fail" => Ok(CompileFail),
32+
"run-fail" => Ok(RunFail),
33+
"run-pass" => Ok(RunPass),
34+
"run-pass-valgrind" => Ok(RunPassValgrind),
35+
"pretty" => Ok(Pretty),
36+
"debuginfo-lldb" => Ok(DebugInfoLldb),
37+
"debuginfo-gdb" => Ok(DebugInfoGdb),
38+
"codegen" => Ok(Codegen),
39+
_ => Err(()),
3940
}
4041
}
4142
}

src/compiletest/compiletest.rs

+18-21
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
// except according to those terms.
1010

1111
#![crate_type = "bin"]
12-
#![allow(unknown_features)]
13-
#![feature(slicing_syntax, unboxed_closures)]
12+
1413
#![feature(box_syntax)]
14+
#![feature(collections)]
15+
#![feature(core)]
1516
#![feature(int_uint)]
16-
#![feature(test)]
17-
#![feature(rustc_private)]
18-
#![feature(std_misc)]
19-
#![feature(path)]
2017
#![feature(io)]
21-
#![feature(core)]
22-
#![feature(collections)]
2318
#![feature(os)]
19+
#![feature(path)]
20+
#![feature(rustc_private)]
21+
#![feature(slicing_syntax, unboxed_closures)]
22+
#![feature(std_misc)]
23+
#![feature(test)]
2424
#![feature(unicode)]
25+
#![feature(env)]
2526

26-
#![allow(unstable)]
2727
#![deny(warnings)]
2828

2929
extern crate test;
@@ -32,10 +32,9 @@ extern crate getopts;
3232
#[macro_use]
3333
extern crate log;
3434

35-
use std::os;
35+
use std::env;
3636
use std::old_io;
3737
use std::old_io::fs;
38-
use std::str::FromStr;
3938
use std::thunk::Thunk;
4039
use getopts::{optopt, optflag, reqopt};
4140
use common::Config;
@@ -50,7 +49,7 @@ pub mod common;
5049
pub mod errors;
5150

5251
pub fn main() {
53-
let args = os::args();
52+
let args = env::args().map(|s| s.into_string().unwrap()).collect();;
5453
let config = parse_config(args);
5554

5655
if config.valgrind_path.is_none() && config.force_valgrind {
@@ -140,9 +139,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
140139
build_base: opt_path(matches, "build-base"),
141140
aux_base: opt_path(matches, "aux-base"),
142141
stage_id: matches.opt_str("stage-id").unwrap(),
143-
mode: FromStr::from_str(matches.opt_str("mode")
144-
.unwrap()
145-
.as_slice()).expect("invalid mode"),
142+
mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"),
146143
run_ignored: matches.opt_present("ignored"),
147144
filter: filter,
148145
logfile: matches.opt_str("logfile").map(|s| Path::new(s)),
@@ -231,15 +228,15 @@ pub fn run_tests(config: &Config) {
231228
// android debug-info test uses remote debugger
232229
// so, we test 1 task at once.
233230
// also trying to isolate problems with adb_run_wrapper.sh ilooping
234-
os::setenv("RUST_TEST_TASKS","1");
231+
env::set_var("RUST_TEST_TASKS","1");
235232
}
236233

237234
match config.mode {
238235
DebugInfoLldb => {
239236
// Some older versions of LLDB seem to have problems with multiple
240237
// instances running in parallel, so only run one test task at a
241238
// time.
242-
os::setenv("RUST_TEST_TASKS", "1");
239+
env::set_var("RUST_TEST_TASKS", "1");
243240
}
244241
_ => { /* proceed */ }
245242
}
@@ -252,7 +249,7 @@ pub fn run_tests(config: &Config) {
252249
old_io::test::raise_fd_limit();
253250
// Prevent issue #21352 UAC blocking .exe containing 'patch' etc. on Windows
254251
// If #11207 is resolved (adding manifest to .exe) this becomes unnecessary
255-
os::setenv("__COMPAT_LAYER", "RunAsInvoker");
252+
env::set_var("__COMPAT_LAYER", "RunAsInvoker");
256253
let res = test::run_tests_console(&opts, tests.into_iter().collect());
257254
match res {
258255
Ok(true) => {}
@@ -283,7 +280,7 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
283280
config.src_base.display());
284281
let mut tests = Vec::new();
285282
let dirs = fs::readdir(&config.src_base).unwrap();
286-
for file in dirs.iter() {
283+
for file in &dirs {
287284
let file = file.clone();
288285
debug!("inspecting file {:?}", file.display());
289286
if is_test(config, &file) {
@@ -311,13 +308,13 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
311308

312309
let mut valid = false;
313310

314-
for ext in valid_extensions.iter() {
311+
for ext in &valid_extensions {
315312
if name.ends_with(ext.as_slice()) {
316313
valid = true;
317314
}
318315
}
319316

320-
for pre in invalid_prefixes.iter() {
317+
for pre in &invalid_prefixes {
321318
if name.starts_with(pre.as_slice()) {
322319
valid = false;
323320
}

src/compiletest/header.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> {
300300
.collect();
301301

302302
match strs.len() {
303-
1u => (strs.pop().unwrap(), "".to_string()),
304-
2u => {
303+
1 => (strs.pop().unwrap(), "".to_string()),
304+
2 => {
305305
let end = strs.pop().unwrap();
306306
(strs.pop().unwrap(), end)
307307
}
@@ -352,8 +352,8 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
352352
panic!("{}", error_string);
353353
}
354354

355-
let major: int = components[0].parse().expect(error_string);
356-
let minor: int = components[1].parse().expect(error_string);
355+
let major: int = components[0].parse().ok().expect(error_string);
356+
let minor: int = components[1].parse().ok().expect(error_string);
357357

358358
return major * 1000 + minor;
359359
}
@@ -363,6 +363,6 @@ pub fn lldb_version_to_int(version_string: &str) -> int {
363363
"Encountered LLDB version string with unexpected format: {}",
364364
version_string);
365365
let error_string = error_string.as_slice();
366-
let major: int = version_string.parse().expect(error_string);
366+
let major: int = version_string.parse().ok().expect(error_string);
367367
return major;
368368
}

src/compiletest/procsrv.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ pub fn run(lib_path: &str,
4040
let mut cmd = Command::new(prog);
4141
cmd.args(args);
4242
add_target_env(&mut cmd, lib_path, aux_path);
43-
for (key, val) in env.into_iter() {
43+
for (key, val) in env {
4444
cmd.env(key, val);
4545
}
4646

4747
match cmd.spawn() {
4848
Ok(mut process) => {
49-
for input in input.iter() {
49+
if let Some(input) = input {
5050
process.stdin.as_mut().unwrap().write_all(input.as_bytes()).unwrap();
5151
}
5252
let ProcessOutput { status, output, error } =
@@ -72,13 +72,13 @@ pub fn run_background(lib_path: &str,
7272
let mut cmd = Command::new(prog);
7373
cmd.args(args);
7474
add_target_env(&mut cmd, lib_path, aux_path);
75-
for (key, val) in env.into_iter() {
75+
for (key, val) in env {
7676
cmd.env(key, val);
7777
}
7878

7979
match cmd.spawn() {
8080
Ok(mut process) => {
81-
for input in input.iter() {
81+
if let Some(input) = input {
8282
process.stdin.as_mut().unwrap().write_all(input.as_bytes()).unwrap();
8383
}
8484

0 commit comments

Comments
 (0)