Skip to content

Rollup of 12 pull requests #34102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jun 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d5c7ddc
Makefile.in: dont use unnecessary escapes in echo
birkenfeld May 22, 2016
a2b7dfa
add explanation for E0429 (`self` use declaration must use brace syntax)
zackmdavis May 30, 2016
06ebda8
revise explanation for E0429 (focus on error first)
zackmdavis May 30, 2016
0eacb9f
Correct issue number in test
shepmaster Jun 2, 2016
f6a243d
Add regression test for issue #32829
jonas-schievink Jun 2, 2016
959c5f1
Update comment
reeze Jun 3, 2016
a7e96af
Unsupport wget
sanxiyn Jun 3, 2016
bce5383
No build.rs for libcore
Ericson2314 Jun 4, 2016
55af6e4
rustdoc: Fix a few missing colors in the CSS
ollie27 Jun 4, 2016
8a6a9af
run rustfmt on libtest folder
srinivasreddy Jun 5, 2016
f5c071c
run rustfmt on librustc_unicode
srinivasreddy Jun 5, 2016
a8ab762
Rollup merge of #33786 - birkenfeld:make-fix, r=jseyfried
eddyb Jun 6, 2016
0e98d1d
Rollup merge of #33955 - zackmdavis:explain_E0429, r=GuillaumeGomez
eddyb Jun 6, 2016
d2b8fb4
Rollup merge of #34048 - shepmaster:corrected-issue-number, r=stevekl…
eddyb Jun 6, 2016
9f5be6c
Rollup merge of #34052 - jonas-schievink:issue-32829, r=brson
eddyb Jun 6, 2016
f646d93
Rollup merge of #34059 - reeze:patch-2, r=GuillaumeGomez
eddyb Jun 6, 2016
594990d
Rollup merge of #34062 - sanxiyn:no-wget, r=nagisa
eddyb Jun 6, 2016
324a356
Rollup merge of #34081 - RustOS-Fork-Holding-Ground:no-core-build-scr…
eddyb Jun 6, 2016
61eeffa
Rollup merge of #34082 - ollie27:rustdoc_css, r=alexcrichton
eddyb Jun 6, 2016
f7a82e0
Rollup merge of #34085 - srinivasreddy:rustfmt_libtest, r=eddyb
eddyb Jun 6, 2016
c770760
Rollup merge of #34090 - srinivasreddy:rustfmt_unicode, r=nagisa
eddyb Jun 6, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ ifneq ($(strip $(findstring TAGS.emacs,$(MAKECMDGOALS)) \
endif

.DEFAULT:
@echo "\n======================================================"
@echo
@echo "======================================================"
@echo "== If you need help, run 'make help' or 'make tips' =="
@echo "======================================================\n"
@echo "======================================================"
@echo
exit 1
7 changes: 4 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/libcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
authors = ["The Rust Project Developers"]
name = "core"
version = "0.0.0"
build = "build.rs"

[lib]
name = "core"
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
//!
Expand Down
25 changes: 24 additions & 1 deletion src/librustc_resolve/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
}
18 changes: 10 additions & 8 deletions src/librustc_unicode/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_unicode/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/librustc_unicode/u_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions src/librustdoc/html/static/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions src/libtest/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/libcore/build.rs → src/test/compile-fail/issue-32829.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
File renamed without changes.