diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2016-06-06 11:02:19 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2016-06-06 11:02:19 +0300 |
| commit | 8519139ab42f83115bb9f4eab1f5ce4a5a4bafe6 (patch) | |
| tree | de9de0233599984785f8e35b5e44a9dbb320550e | |
| parent | 5b1e914b913e93f0fe182a42c897b759824a5e44 (diff) | |
| parent | c77076074c3a99e58d357275c2c8542171eeec86 (diff) | |
| download | rust-8519139ab42f83115bb9f4eab1f5ce4a5a4bafe6.tar.gz rust-8519139ab42f83115bb9f4eab1f5ce4a5a4bafe6.zip | |
Merge pull request #34102 from eddyb/rollup
Rollup of 12 pull requests
| -rwxr-xr-x | configure | 7 | ||||
| -rw-r--r-- | src/libcore/Cargo.toml | 1 | ||||
| -rw-r--r-- | src/libcore/intrinsics.rs | 2 | ||||
| -rw-r--r-- | src/librustc_resolve/diagnostics.rs | 25 | ||||
| -rw-r--r-- | src/librustc_unicode/char.rs | 18 | ||||
| -rw-r--r-- | src/librustc_unicode/lib.rs | 8 | ||||
| -rw-r--r-- | src/librustc_unicode/u_str.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/static/rustdoc.css | 6 | ||||
| -rw-r--r-- | src/librustdoc/html/static/styles/main.css | 5 | ||||
| -rw-r--r-- | src/libtest/stats.rs | 3 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-32829.rs (renamed from src/libcore/build.rs) | 8 | ||||
| -rw-r--r-- | src/test/run-pass/issue-23958.rs (renamed from src/test/run-pass/issue-23598.rs) | 0 |
12 files changed, 57 insertions, 30 deletions
diff --git a/configure b/configure index b7053c5c54f..a36362e0ada 100755 --- a/configure +++ b/configure @@ -133,12 +133,13 @@ probe() { } probe_need() { - local V=$1 probe $* + local V=$1 + shift eval VV=\$$V if [ -z "$VV" ] then - err "needed, but unable to find any of: $*" + err "$V needed, but unable to find any of: $*" fi } @@ -725,7 +726,7 @@ if [ -n "$CFG_ENABLE_ORBIT" ]; then putvar CFG_ENABLE_ORBIT; fi step_msg "looking for build programs" -probe_need CFG_CURLORWGET curl wget +probe_need CFG_CURL curl if [ -z "$CFG_PYTHON_PROVIDED" ]; then probe_need CFG_PYTHON python2.7 python2 python fi diff --git a/src/libcore/Cargo.toml b/src/libcore/Cargo.toml index 02fe574b81e..3b406ac0447 100644 --- a/src/libcore/Cargo.toml +++ b/src/libcore/Cargo.toml @@ -2,7 +2,6 @@ authors = ["The Rust Project Developers"] name = "core" version = "0.0.0" -build = "build.rs" [lib] name = "core" diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 0350824ee35..94baf188bca 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -10,7 +10,7 @@ //! rustc compiler intrinsics. //! -//! The corresponding definitions are in librustc_trans/trans/intrinsic.rs. +//! The corresponding definitions are in librustc_trans/intrinsic.rs. //! //! # Volatiles //! diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs index b576f77dbd7..97b57f231b9 100644 --- a/src/librustc_resolve/diagnostics.rs +++ b/src/librustc_resolve/diagnostics.rs @@ -1029,6 +1029,30 @@ struct Bar2; // ok! ``` "##, +E0429: r##" +The `self` keyword cannot appear alone as the last segment in a `use` +declaration. + +Example of erroneous code: + +```compile_fail +use std::fmt::self; // error: `self` imports are only allowed within a { } list +``` + +To use a namespace itself in addition to some of its members, `self` may appear +as part of a brace-enclosed list of imports: + +``` +use std::fmt::{self, Debug}; +``` + +If you only want to import the namespace, do so directly: + +``` +use std::fmt; +``` +"##, + E0430: r##" The `self` import appears more than once in the list. Erroneous code example: @@ -1235,5 +1259,4 @@ register_diagnostics! { E0420, // is not an associated const E0421, // unresolved associated const E0427, // cannot use `ref` binding mode with ... - E0429, // `self` imports are only allowed within a { } list } diff --git a/src/librustc_unicode/char.rs b/src/librustc_unicode/char.rs index 863cada5b88..77de51b32e2 100644 --- a/src/librustc_unicode/char.rs +++ b/src/librustc_unicode/char.rs @@ -30,13 +30,13 @@ use core::char::CharExt as C; use core::fmt; -use tables::{derived_property, property, general_category, conversions}; +use tables::{conversions, derived_property, general_category, property}; // stable reexports #[stable(feature = "rust1", since = "1.0.0")] -pub use core::char::{MAX, from_u32, from_u32_unchecked, from_digit}; +pub use core::char::{MAX, from_digit, from_u32, from_u32_unchecked}; #[stable(feature = "rust1", since = "1.0.0")] -pub use core::char::{EscapeUnicode, EscapeDefault, EncodeUtf8, EncodeUtf16}; +pub use core::char::{EncodeUtf16, EncodeUtf8, EscapeDefault, EscapeUnicode}; // unstable reexports #[unstable(feature = "unicode", issue = "27783")] @@ -808,16 +808,18 @@ pub fn decode_utf16<I: IntoIterator<Item = u16>>(iter: I) -> DecodeUtf16<I::Into } #[stable(feature = "decode_utf16", since = "1.9.0")] -impl<I: Iterator<Item=u16>> Iterator for DecodeUtf16<I> { +impl<I: Iterator<Item = u16>> Iterator for DecodeUtf16<I> { type Item = Result<char, DecodeUtf16Error>; fn next(&mut self) -> Option<Result<char, DecodeUtf16Error>> { let u = match self.buf.take() { Some(buf) => buf, - None => match self.iter.next() { - Some(u) => u, - None => return None, - }, + None => { + match self.iter.next() { + Some(u) => u, + None => return None, + } + } }; if u < 0xD800 || 0xDFFF < u { diff --git a/src/librustc_unicode/lib.rs b/src/librustc_unicode/lib.rs index 2f7f724e6af..b03d7ee79e8 100644 --- a/src/librustc_unicode/lib.rs +++ b/src/librustc_unicode/lib.rs @@ -43,14 +43,14 @@ pub mod char; #[allow(deprecated)] pub mod str { - pub use u_str::{UnicodeStr, SplitWhitespace}; - pub use u_str::{utf8_char_width, is_utf16}; - pub use u_str::{Utf16Encoder}; + pub use u_str::{SplitWhitespace, UnicodeStr}; + pub use u_str::{is_utf16, utf8_char_width}; + pub use u_str::Utf16Encoder; } // For use in libcollections, not re-exported in libstd. pub mod derived_property { - pub use tables::derived_property::{Cased, Case_Ignorable}; + pub use tables::derived_property::{Case_Ignorable, Cased}; } // For use in libsyntax diff --git a/src/librustc_unicode/u_str.rs b/src/librustc_unicode/u_str.rs index 18734a66871..0bac44b837f 100644 --- a/src/librustc_unicode/u_str.rs +++ b/src/librustc_unicode/u_str.rs @@ -144,7 +144,9 @@ impl<I> Utf16Encoder<I> { } } -impl<I> Iterator for Utf16Encoder<I> where I: Iterator<Item=char> { +impl<I> Iterator for Utf16Encoder<I> + where I: Iterator<Item = char> +{ type Item = u16; #[inline] diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index bfe3f7b8dd6..45dacb68e91 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -409,8 +409,8 @@ a { .content span.enum, .content a.enum, .block a.current.enum { color: #5e9766; } .content span.struct, .content a.struct, .block a.current.struct { color: #df3600; } -.content a.type { color: #e57300; } -.content a.macro { color: #068000; } +.content span.type, .content a.type, .block a.current.type { color: #e57300; } +.content span.macro, .content a.macro, .block a.current.macro { color: #068000; } .block a.current.crate { font-weight: 500; } .search-input { @@ -453,7 +453,7 @@ a { .content .search-results td:first-child { padding-right: 0; } .content .search-results td:first-child a { padding-right: 10px; } -tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; } +tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; color: black} body.blur > :not(#help) { filter: blur(8px); diff --git a/src/librustdoc/html/static/styles/main.css b/src/librustdoc/html/static/styles/main.css index aa08cee13ef..aee6d15b7ca 100644 --- a/src/librustdoc/html/static/styles/main.css +++ b/src/librustdoc/html/static/styles/main.css @@ -88,8 +88,9 @@ pre { border-bottom-color: #ddd; } -.content a.primitive { color: #39a7bf; } -.content span.externcrate, span.mod, .content a.mod, block a.current.mod { color: #4d76ae; } +.content span.primitive, .content a.primitive, .block a.current.primitive { color: #39a7bf; } +.content span.externcrate, +.content span.mod, .content a.mod, .block a.current.mod { color: #4d76ae; } .content span.fn, .content a.fn, .block a.current.fn, .content span.method, .content a.method, .block a.current.method, .content span.tymethod, .content a.tymethod, .block a.current.tymethod, diff --git a/src/libtest/stats.rs b/src/libtest/stats.rs index 335b6d67209..1883f0aba23 100644 --- a/src/libtest/stats.rs +++ b/src/libtest/stats.rs @@ -11,7 +11,7 @@ #![allow(missing_docs)] #![allow(deprecated)] // Float -use std::cmp::Ordering::{self, Less, Greater, Equal}; +use std::cmp::Ordering::{self, Equal, Greater, Less}; use std::mem; fn local_cmp(x: f64, y: f64) -> Ordering { @@ -35,7 +35,6 @@ fn local_sort(v: &mut [f64]) { /// Trait that provides simple descriptive statistics on a univariate set of numeric samples. pub trait Stats { - /// Sum of the samples. /// /// Note: this method sacrifices performance at the altar of accuracy diff --git a/src/libcore/build.rs b/src/test/compile-fail/issue-32829.rs index 255a367e58b..9ac70882ca2 100644 --- a/src/libcore/build.rs +++ b/src/test/compile-fail/issue-32829.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![deny(warnings)] +// error-pattern: calls in statics are limited + +static S : u64 = { { panic!("foo"); 0 } }; fn main() { - // Remove this whenever snapshots and rustbuild nightlies are synced. - println!("cargo:rustc-cfg=cargobuild"); - println!("cargo:rerun-if-changed=build.rs") + println!("{:?}", S); } diff --git a/src/test/run-pass/issue-23598.rs b/src/test/run-pass/issue-23958.rs index 5f1c79a3c15..5f1c79a3c15 100644 --- a/src/test/run-pass/issue-23598.rs +++ b/src/test/run-pass/issue-23958.rs |
