From 0d80b2a0415e39a4b9421919d2b131f23e0d42de Mon Sep 17 00:00:00 2001 From: Nick Hamann Date: Fri, 22 May 2015 19:32:02 -0500 Subject: [PATCH 1/7] docs: Improve descriptions for some methods in core::cell. --- src/libcore/cell.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 45a8012210417..67ae19079c8c2 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -212,7 +212,7 @@ impl Cell { } } - /// Gets a reference to the underlying `UnsafeCell`. + /// Returns a reference to the underlying `UnsafeCell`. /// /// # Unsafety /// @@ -439,7 +439,7 @@ impl RefCell { } } - /// Gets a reference to the underlying `UnsafeCell`. + /// Returns a reference to the underlying `UnsafeCell`. /// /// This can be used to circumvent `RefCell`'s safety checks. /// @@ -671,8 +671,8 @@ impl UnsafeCell { /// /// # Unsafety /// - /// This function is unsafe because there is no guarantee that this or other threads are - /// currently inspecting the inner value. + /// This function is unsafe because this thread or another thread may currently be + /// inspecting the inner value. /// /// # Examples /// From d323c14f631576c639219d18f2574b4f2380172a Mon Sep 17 00:00:00 2001 From: Kubilay Kocak Date: Tue, 26 May 2015 18:23:33 +1000 Subject: [PATCH 2/7] Remove redundant compiler check. Allow CC override Currently, there are two conditional blocks that exist to check for "clang or gcc" On line 866: ``` if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ] then err "either clang or gcc is required" fi ``` and on line 1019: ``` if [ -z "$CC" -a -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ] then err "either clang or gcc is required" fi ``` Given the order of the clauses, this results in the "either clang or gcc is required" error from the earlier block, (even) when CC is set. The expected behaviour is to honour user-flags, in this case CC. Aside from removing all hand-holdy compiler checks in favour of actual compiler *feature* checks, this change removes the redundant former block in favour of the latter block, which appears designed to allow the expected behaviour. --- configure | 5 ----- 1 file changed, 5 deletions(-) diff --git a/configure b/configure index efa836ca97646..20a5fa390f00b 100755 --- a/configure +++ b/configure @@ -863,11 +863,6 @@ then CFG_DISABLE_JEMALLOC=1 fi -if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ] -then - err "either clang or gcc is required" -fi - # OS X 10.9, gcc is actually clang. This can cause some confusion in the build # system, so if we find that gcc is clang, we should just use clang directly. if [ $CFG_OSTYPE = apple-darwin -a -z "$CFG_ENABLE_CLANG" ] From 04c7b82c1944857c268ff79993f69c16545efb52 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Wed, 20 May 2015 23:19:55 -0400 Subject: [PATCH 3/7] Document std::env::const values --- src/libstd/env.rs | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 126ef38b9188f..3e38f9e6c4de7 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -598,40 +598,94 @@ pub fn page_size() -> usize { pub mod consts { /// A string describing the architecture of the CPU that this is currently /// in use. + /// + /// Some possible values: + /// + /// - x86 + /// - x86_64 + /// - arm + /// - aarch64 + /// - mips + /// - mipsel + /// - powerpc #[stable(feature = "env", since = "1.0.0")] pub const ARCH: &'static str = super::arch::ARCH; /// The family of the operating system. In this case, `unix`. + /// + /// Some possible values: + /// + /// - unix + /// - windows #[stable(feature = "env", since = "1.0.0")] pub const FAMILY: &'static str = super::os::FAMILY; /// A string describing the specific operating system in use: in this /// case, `linux`. + /// + /// Some possible values: + /// + /// - linux + /// - macos + /// - ios + /// - freebsd + /// - dragonfly + /// - bitrig + /// - openbsd + /// - android + /// - windows #[stable(feature = "env", since = "1.0.0")] pub const OS: &'static str = super::os::OS; /// Specifies the filename prefix used for shared libraries on this /// platform: in this case, `lib`. + /// + /// Some possible values: + /// + /// - lib + /// - `""` (an empty string) #[stable(feature = "env", since = "1.0.0")] pub const DLL_PREFIX: &'static str = super::os::DLL_PREFIX; /// Specifies the filename suffix used for shared libraries on this /// platform: in this case, `.so`. + /// + /// Some possible values: + /// + /// - .so + /// - .dylib + /// - .dll #[stable(feature = "env", since = "1.0.0")] pub const DLL_SUFFIX: &'static str = super::os::DLL_SUFFIX; /// Specifies the file extension used for shared libraries on this /// platform that goes after the dot: in this case, `so`. + /// + /// Some possible values: + /// + /// - .so + /// - .dylib + /// - .dll #[stable(feature = "env", since = "1.0.0")] pub const DLL_EXTENSION: &'static str = super::os::DLL_EXTENSION; /// Specifies the filename suffix used for executable binaries on this /// platform: in this case, the empty string. + /// + /// Some possible values: + /// + /// - exe + /// - `""` (an empty string) #[stable(feature = "env", since = "1.0.0")] pub const EXE_SUFFIX: &'static str = super::os::EXE_SUFFIX; /// Specifies the file extension, if any, used for executable binaries /// on this platform: in this case, the empty string. + /// + /// Some possible values: + /// + /// - exe + /// - `""` (an empty string) #[stable(feature = "env", since = "1.0.0")] pub const EXE_EXTENSION: &'static str = super::os::EXE_EXTENSION; From ff682048804453b67199acc9c64f332e58251c41 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Tue, 26 May 2015 20:34:50 +1200 Subject: [PATCH 4/7] Add a WONTFIX message to a failing test. Closes #20184 --- src/librustc_trans/back/link.rs | 2 +- src/librustc_trans/back/write.rs | 4 ++-- src/test/compile-fail/asm-src-loc-codegen-units.rs | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs index 844a0a698677f..c416a9810eb0e 100644 --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs @@ -279,7 +279,7 @@ pub fn sanitize(s: &str) -> String { } pub fn mangle>(path: PI, - hash: Option<&str>) -> String { + hash: Option<&str>) -> String { // Follow C++ namespace-mangling style, see // http://en.wikipedia.org/wiki/Name_mangling for more info. // diff --git a/src/librustc_trans/back/write.rs b/src/librustc_trans/back/write.rs index a9e9e3f4048ac..aec8f2b3fa748 100644 --- a/src/librustc_trans/back/write.rs +++ b/src/librustc_trans/back/write.rs @@ -342,8 +342,8 @@ struct HandlerFreeVars<'a> { } unsafe extern "C" fn report_inline_asm<'a, 'b>(cgcx: &'a CodegenContext<'a>, - msg: &'b str, - cookie: c_uint) { + msg: &'b str, + cookie: c_uint) { use syntax::codemap::ExpnId; match cgcx.lto_ctxt { diff --git a/src/test/compile-fail/asm-src-loc-codegen-units.rs b/src/test/compile-fail/asm-src-loc-codegen-units.rs index 5ebcdb20b1952..79f0c436759b3 100644 --- a/src/test/compile-fail/asm-src-loc-codegen-units.rs +++ b/src/test/compile-fail/asm-src-loc-codegen-units.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. // -// ignore-stage1 (#20184) +// WONTFIX(#20184) Needs landing pads (not present in stage1) or the compiler hangs. +// ignore-stage1 // compile-flags: -C codegen-units=2 // error-pattern: build without -C codegen-units for more exact errors From 577bbaceb982623ecd2b220a31a162ccb3b1d378 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Tue, 5 May 2015 16:30:13 -0400 Subject: [PATCH 5/7] Add note about filesystems to fs::rename Fixes #24816 --- src/libstd/fs.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 5a05c61e064df..0a19350851ea0 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -844,6 +844,8 @@ pub fn symlink_metadata>(path: P) -> io::Result { /// Rename a file or directory to a new name. /// +/// This will not work if the new name is on a different mount point. +/// /// # Errors /// /// This function will return an error if the provided `from` doesn't exist, if From ea5c8eb2c9ca9af16a141b0e9b0f22c1b99b0495 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Tue, 26 May 2015 16:03:41 -0700 Subject: [PATCH 6/7] Bump manpage date and version for 1.2.0-dev. Estimating August as the release date for 1.2.0. --- man/rustc.1 | 2 +- man/rustdoc.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/man/rustc.1 b/man/rustc.1 index b15829db431df..36f4e529b6c52 100644 --- a/man/rustc.1 +++ b/man/rustc.1 @@ -1,4 +1,4 @@ -.TH RUSTC "1" "March 2014" "rustc 0.13.0" "User Commands" +.TH RUSTC "1" "August 2015" "rustc 1.2.0" "User Commands" .SH NAME rustc \- The Rust compiler .SH SYNOPSIS diff --git a/man/rustdoc.1 b/man/rustdoc.1 index 1738354fb43d5..b710c2c3a2560 100644 --- a/man/rustdoc.1 +++ b/man/rustdoc.1 @@ -1,4 +1,4 @@ -.TH RUSTDOC "1" "March 2014" "rustdoc 0.13.0" "User Commands" +.TH RUSTDOC "1" "August 2015" "rustdoc 1.2.0" "User Commands" .SH NAME rustdoc \- generate documentation from Rust source code .SH SYNOPSIS From bb61b0b8bb7c078bfa035cd5c392f029802b49ec Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Tue, 26 May 2015 16:06:43 -0700 Subject: [PATCH 7/7] Update rustc manpage. rustc -C target-cpu=help is no longer supported. Recommend the llc tool intead like 'rustc --help'. --- man/rustc.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/rustc.1 b/man/rustc.1 index 36f4e529b6c52..0cb1c5dc32b8e 100644 --- a/man/rustc.1 +++ b/man/rustc.1 @@ -160,7 +160,7 @@ If the value is 'help', then a list of available CPUs is printed. \fBtarget\-feature\fR='\fI+feature1\fR,\fI\-feature2\fR' A comma\[hy]separated list of features to enable or disable for the target. A preceding '+' enables a feature while a preceding '\-' disables it. -Available features can be discovered through \fItarget\-cpu=help\fR. +Available features can be discovered through \fIllc -mcpu=help\fR. .TP \fBpasses\fR=\fIval\fR A space\[hy]separated list of extra LLVM passes to run.