From 1a910a0ff37fac9d7571fb6b3a6e0f6d7f87dcfd Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 27 Jan 2016 22:34:26 -0800 Subject: [PATCH 1/8] mk: Remove the -mfpu=vfp4 argument from arm iOS Unfortunately older clang compilers don't support this argument, so the bootstrap will fail. We don't actually really need to optimized the C code we compile, however, as currently we're just compiling jemalloc and not much else. --- mk/cfg/armv7s-apple-ios.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/cfg/armv7s-apple-ios.mk b/mk/cfg/armv7s-apple-ios.mk index 96ca07648949f..efad43d25627d 100644 --- a/mk/cfg/armv7s-apple-ios.mk +++ b/mk/cfg/armv7s-apple-ios.mk @@ -14,8 +14,8 @@ CFG_LIB_GLOB_armv7s-apple-ios = lib$(1)-*.a CFG_INSTALL_ONLY_RLIB_armv7s-apple-ios = 1 CFG_STATIC_LIB_NAME_armv7s-apple-ios=lib$(1).a CFG_LIB_DSYM_GLOB_armv7s-apple-ios = lib$(1)-*.a.dSYM -CFG_JEMALLOC_CFLAGS_armv7s-apple-ios := -arch armv7s -mfpu=vfp4 $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios) -CFG_GCCISH_CFLAGS_armv7s-apple-ios := -Wall -Werror -g -fPIC $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios) -mfpu=vfp4 -arch armv7s +CFG_JEMALLOC_CFLAGS_armv7s-apple-ios := -arch armv7s $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios) +CFG_GCCISH_CFLAGS_armv7s-apple-ios := -Wall -Werror -g -fPIC $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios) -arch armv7s CFG_GCCISH_CXXFLAGS_armv7s-apple-ios := -fno-rtti $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios) -I$(CFG_IOS_SDK_armv7s-apple-ios)/usr/include/c++/4.2.1 CFG_GCCISH_LINK_FLAGS_armv7s-apple-ios := -lpthread -syslibroot $(CFG_IOS_SDK_armv7s-apple-ios) -Wl,-no_compact_unwind CFG_GCCISH_DEF_FLAG_armv7s-apple-ios := -Wl,-exported_symbols_list, From 205f836ab8b8fb67558ccfe611f9afac5a147825 Mon Sep 17 00:00:00 2001 From: est31 Date: Thu, 28 Jan 2016 18:39:39 +0100 Subject: [PATCH 2/8] Fix reference info about parent doc block comments Block comments don't have to be in the format `/*! ... !*/` in order to be read as doc comments about the parent block. The format `/*! ... */` is enough. --- src/doc/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/reference.md b/src/doc/reference.md index f0fdae27ac7fb..cee2a26f60fc4 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -104,7 +104,7 @@ comments (`/** ... */`), are interpreted as a special syntax for `doc` `#[doc="..."]` around the body of the comment, i.e., `/// Foo` turns into `#[doc="Foo"]`. -Line comments beginning with `//!` and block comments `/*! ... !*/` are +Line comments beginning with `//!` and block comments `/*! ... */` are doc comments that apply to the parent of the comment, rather than the item that follows. That is, they are equivalent to writing `#![doc="..."]` around the body of the comment. `//!` comments are usually used to document From ad5ab2f360d618b18c593368c0a16603f42bfdcb Mon Sep 17 00:00:00 2001 From: Oliver Middleton Date: Thu, 28 Jan 2016 21:02:22 +0000 Subject: [PATCH 3/8] rustdoc: Add missing trailing comma for single element tuples --- src/librustdoc/html/format.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index b0df209d3dc52..9d5189cfd0b12 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -460,7 +460,7 @@ impl fmt::Display for clean::Type { [] => primitive_link(f, clean::PrimitiveTuple, "()"), [ref one] => { try!(primitive_link(f, clean::PrimitiveTuple, "(")); - try!(write!(f, "{}", one)); + try!(write!(f, "{},", one)); primitive_link(f, clean::PrimitiveTuple, ")") } many => { From 77cdeb043766502618891be1973e9d70be29ffe3 Mon Sep 17 00:00:00 2001 From: tgor Date: Fri, 29 Jan 2016 02:13:34 +0300 Subject: [PATCH 4/8] std::string::String.from_utf16 doc fix --- src/libcollections/string.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index d9cbc4488fca7..97c12043e7634 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -641,7 +641,7 @@ impl String { Cow::Owned(res) } - /// Decode a UTF-16 encoded vector `v` into a `String`, returning `None` + /// Decode a UTF-16 encoded vector `v` into a `String`, returning `Err` /// if `v` contains any invalid data. /// /// # Examples From 515fac178a486a6a0135b0d20b3f5b1edfb03482 Mon Sep 17 00:00:00 2001 From: Oliver Middleton Date: Thu, 28 Jan 2016 23:40:35 +0000 Subject: [PATCH 5/8] rustdoc: Add test for tuple rendering --- src/test/rustdoc/tuples.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/test/rustdoc/tuples.rs diff --git a/src/test/rustdoc/tuples.rs b/src/test/rustdoc/tuples.rs new file mode 100644 index 0000000000000..2269b38780df0 --- /dev/null +++ b/src/test/rustdoc/tuples.rs @@ -0,0 +1,18 @@ +// Copyright 2016 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_name = "foo"] + +// @has foo/fn.tuple0.html //pre 'pub fn tuple0(x: ())' +pub fn tuple0(x: ()) -> () { x } +// @has foo/fn.tuple1.html //pre 'pub fn tuple1(x: (i32,)) -> (i32,)' +pub fn tuple1(x: (i32,)) -> (i32,) { x } +// @has foo/fn.tuple2.html //pre 'pub fn tuple2(x: (i32, i32)) -> (i32, i32)' +pub fn tuple2(x: (i32, i32)) -> (i32, i32) { x } From acaf151ade7befa92eee8a9e0c3d03695194292b Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 28 Jan 2016 19:33:29 -0800 Subject: [PATCH 6/8] std: Fix rumprun build Looks like the rumprun build has bitrotted over time, so this includes some libc fixes and some various libstd fixes which gets it back to bootstrapping. --- src/liblibc | 2 +- src/libstd/sys/unix/thread.rs | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/liblibc b/src/liblibc index af77843345ec6..91ff43c736de6 160000 --- a/src/liblibc +++ b/src/liblibc @@ -1 +1 @@ -Subproject commit af77843345ec6fc7e51113bfd692138d89024bc0 +Subproject commit 91ff43c736de664f8d3cd351e148c09cdea6731e diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index 9e28cf06d619a..0faa1465c324a 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -15,7 +15,6 @@ use cmp; #[cfg(not(target_env = "newlib"))] use ffi::CString; use io; -use libc::PTHREAD_STACK_MIN; use libc; use mem; use ptr; @@ -339,14 +338,20 @@ fn min_stack_size(attr: *const libc::pthread_attr_t) -> usize { }); match unsafe { __pthread_get_minstack } { - None => PTHREAD_STACK_MIN as usize, + None => libc::PTHREAD_STACK_MIN as usize, Some(f) => unsafe { f(attr) as usize }, } } // No point in looking up __pthread_get_minstack() on non-glibc // platforms. -#[cfg(not(target_os = "linux"))] +#[cfg(all(not(target_os = "linux"), + not(target_os = "netbsd")))] +fn min_stack_size(_: *const libc::pthread_attr_t) -> usize { + libc::PTHREAD_STACK_MIN as usize +} + +#[cfg(target_os = "netbsd")] fn min_stack_size(_: *const libc::pthread_attr_t) -> usize { - PTHREAD_STACK_MIN as usize + 2048 // just a guess } From ba97b06609a9f7b503ed0a83cc76d8fa89519752 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 28 Jan 2016 21:50:29 -0800 Subject: [PATCH 7/8] mk: Fix cross prefix for powerpc64 Looks like the way to create these executables is to use the standard `powerpc-linux-gnu-gcc` compiler but with the `-m64` option. --- mk/cfg/powerpc64-unknown-linux-gnu.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/cfg/powerpc64-unknown-linux-gnu.mk b/mk/cfg/powerpc64-unknown-linux-gnu.mk index a9e8585ad6db5..cf49c711ba61f 100644 --- a/mk/cfg/powerpc64-unknown-linux-gnu.mk +++ b/mk/cfg/powerpc64-unknown-linux-gnu.mk @@ -1,5 +1,5 @@ # powerpc64-unknown-linux-gnu configuration -CROSS_PREFIX_powerpc64-unknown-linux-gnu=powerpc64-linux-gnu- +CROSS_PREFIX_powerpc64-unknown-linux-gnu=powerpc-linux-gnu- CC_powerpc64-unknown-linux-gnu=$(CC) CXX_powerpc64-unknown-linux-gnu=$(CXX) CPP_powerpc64-unknown-linux-gnu=$(CPP) From 5012d205ccaaf576229c5ebdf5cdfbf60af79008 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Thu, 28 Jan 2016 12:56:06 +0100 Subject: [PATCH 8/8] don't leak RUST_BACKTRACE into test process If the tests were run with `RUST_BACKTRACE=1 make check` this test failed. If they were run without it it succeeded. We need to use `env_remove` instead of `env_clear` because the latter will never work on windows --- src/test/run-pass/multi-panic.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/run-pass/multi-panic.rs b/src/test/run-pass/multi-panic.rs index 7bf07314dcc17..6a0d7278b5e16 100644 --- a/src/test/run-pass/multi-panic.rs +++ b/src/test/run-pass/multi-panic.rs @@ -17,7 +17,10 @@ fn main() { panic!(); } else { - let test = std::process::Command::new(&args[0]).arg("run_test").output().unwrap(); + let test = std::process::Command::new(&args[0]).arg("run_test") + .env_remove("RUST_BACKTRACE") + .output() + .unwrap(); assert!(!test.status.success()); let err = String::from_utf8_lossy(&test.stderr); let mut it = err.lines();