Skip to content

Commit 8519139

Browse files
committed
Merge pull request #34102 from eddyb/rollup
Rollup of 12 pull requests
2 parents 5b1e914 + c770760 commit 8519139

File tree

12 files changed

+57
-30
lines changed

12 files changed

+57
-30
lines changed

configure

+4-3
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,13 @@ probe() {
133133
}
134134

135135
probe_need() {
136-
local V=$1
137136
probe $*
137+
local V=$1
138+
shift
138139
eval VV=\$$V
139140
if [ -z "$VV" ]
140141
then
141-
err "needed, but unable to find any of: $*"
142+
err "$V needed, but unable to find any of: $*"
142143
fi
143144
}
144145

@@ -725,7 +726,7 @@ if [ -n "$CFG_ENABLE_ORBIT" ]; then putvar CFG_ENABLE_ORBIT; fi
725726

726727
step_msg "looking for build programs"
727728

728-
probe_need CFG_CURLORWGET curl wget
729+
probe_need CFG_CURL curl
729730
if [ -z "$CFG_PYTHON_PROVIDED" ]; then
730731
probe_need CFG_PYTHON python2.7 python2 python
731732
fi

src/libcore/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
authors = ["The Rust Project Developers"]
33
name = "core"
44
version = "0.0.0"
5-
build = "build.rs"
65

76
[lib]
87
name = "core"

src/libcore/intrinsics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! rustc compiler intrinsics.
1212
//!
13-
//! The corresponding definitions are in librustc_trans/trans/intrinsic.rs.
13+
//! The corresponding definitions are in librustc_trans/intrinsic.rs.
1414
//!
1515
//! # Volatiles
1616
//!

src/librustc_resolve/diagnostics.rs

+24-1
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,30 @@ struct Bar2; // ok!
10291029
```
10301030
"##,
10311031

1032+
E0429: r##"
1033+
The `self` keyword cannot appear alone as the last segment in a `use`
1034+
declaration.
1035+
1036+
Example of erroneous code:
1037+
1038+
```compile_fail
1039+
use std::fmt::self; // error: `self` imports are only allowed within a { } list
1040+
```
1041+
1042+
To use a namespace itself in addition to some of its members, `self` may appear
1043+
as part of a brace-enclosed list of imports:
1044+
1045+
```
1046+
use std::fmt::{self, Debug};
1047+
```
1048+
1049+
If you only want to import the namespace, do so directly:
1050+
1051+
```
1052+
use std::fmt;
1053+
```
1054+
"##,
1055+
10321056
E0430: r##"
10331057
The `self` import appears more than once in the list. Erroneous code example:
10341058
@@ -1235,5 +1259,4 @@ register_diagnostics! {
12351259
E0420, // is not an associated const
12361260
E0421, // unresolved associated const
12371261
E0427, // cannot use `ref` binding mode with ...
1238-
E0429, // `self` imports are only allowed within a { } list
12391262
}

src/librustc_unicode/char.rs

+10-8
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030

3131
use core::char::CharExt as C;
3232
use core::fmt;
33-
use tables::{derived_property, property, general_category, conversions};
33+
use tables::{conversions, derived_property, general_category, property};
3434

3535
// stable reexports
3636
#[stable(feature = "rust1", since = "1.0.0")]
37-
pub use core::char::{MAX, from_u32, from_u32_unchecked, from_digit};
37+
pub use core::char::{MAX, from_digit, from_u32, from_u32_unchecked};
3838
#[stable(feature = "rust1", since = "1.0.0")]
39-
pub use core::char::{EscapeUnicode, EscapeDefault, EncodeUtf8, EncodeUtf16};
39+
pub use core::char::{EncodeUtf16, EncodeUtf8, EscapeDefault, EscapeUnicode};
4040

4141
// unstable reexports
4242
#[unstable(feature = "unicode", issue = "27783")]
@@ -808,16 +808,18 @@ pub fn decode_utf16<I: IntoIterator<Item = u16>>(iter: I) -> DecodeUtf16<I::Into
808808
}
809809

810810
#[stable(feature = "decode_utf16", since = "1.9.0")]
811-
impl<I: Iterator<Item=u16>> Iterator for DecodeUtf16<I> {
811+
impl<I: Iterator<Item = u16>> Iterator for DecodeUtf16<I> {
812812
type Item = Result<char, DecodeUtf16Error>;
813813

814814
fn next(&mut self) -> Option<Result<char, DecodeUtf16Error>> {
815815
let u = match self.buf.take() {
816816
Some(buf) => buf,
817-
None => match self.iter.next() {
818-
Some(u) => u,
819-
None => return None,
820-
},
817+
None => {
818+
match self.iter.next() {
819+
Some(u) => u,
820+
None => return None,
821+
}
822+
}
821823
};
822824

823825
if u < 0xD800 || 0xDFFF < u {

src/librustc_unicode/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ pub mod char;
4343

4444
#[allow(deprecated)]
4545
pub mod str {
46-
pub use u_str::{UnicodeStr, SplitWhitespace};
47-
pub use u_str::{utf8_char_width, is_utf16};
48-
pub use u_str::{Utf16Encoder};
46+
pub use u_str::{SplitWhitespace, UnicodeStr};
47+
pub use u_str::{is_utf16, utf8_char_width};
48+
pub use u_str::Utf16Encoder;
4949
}
5050

5151
// For use in libcollections, not re-exported in libstd.
5252
pub mod derived_property {
53-
pub use tables::derived_property::{Cased, Case_Ignorable};
53+
pub use tables::derived_property::{Case_Ignorable, Cased};
5454
}
5555

5656
// For use in libsyntax

src/librustc_unicode/u_str.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ impl<I> Utf16Encoder<I> {
144144
}
145145
}
146146

147-
impl<I> Iterator for Utf16Encoder<I> where I: Iterator<Item=char> {
147+
impl<I> Iterator for Utf16Encoder<I>
148+
where I: Iterator<Item = char>
149+
{
148150
type Item = u16;
149151

150152
#[inline]

src/librustdoc/html/static/rustdoc.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ a {
409409

410410
.content span.enum, .content a.enum, .block a.current.enum { color: #5e9766; }
411411
.content span.struct, .content a.struct, .block a.current.struct { color: #df3600; }
412-
.content a.type { color: #e57300; }
413-
.content a.macro { color: #068000; }
412+
.content span.type, .content a.type, .block a.current.type { color: #e57300; }
413+
.content span.macro, .content a.macro, .block a.current.macro { color: #068000; }
414414
.block a.current.crate { font-weight: 500; }
415415

416416
.search-input {
@@ -453,7 +453,7 @@ a {
453453
.content .search-results td:first-child { padding-right: 0; }
454454
.content .search-results td:first-child a { padding-right: 10px; }
455455

456-
tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; }
456+
tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; color: black}
457457

458458
body.blur > :not(#help) {
459459
filter: blur(8px);

src/librustdoc/html/static/styles/main.css

+3-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ pre {
8888
border-bottom-color: #ddd;
8989
}
9090

91-
.content a.primitive { color: #39a7bf; }
92-
.content span.externcrate, span.mod, .content a.mod, block a.current.mod { color: #4d76ae; }
91+
.content span.primitive, .content a.primitive, .block a.current.primitive { color: #39a7bf; }
92+
.content span.externcrate,
93+
.content span.mod, .content a.mod, .block a.current.mod { color: #4d76ae; }
9394
.content span.fn, .content a.fn, .block a.current.fn,
9495
.content span.method, .content a.method, .block a.current.method,
9596
.content span.tymethod, .content a.tymethod, .block a.current.tymethod,

src/libtest/stats.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#![allow(missing_docs)]
1212
#![allow(deprecated)] // Float
1313

14-
use std::cmp::Ordering::{self, Less, Greater, Equal};
14+
use std::cmp::Ordering::{self, Equal, Greater, Less};
1515
use std::mem;
1616

1717
fn local_cmp(x: f64, y: f64) -> Ordering {
@@ -35,7 +35,6 @@ fn local_sort(v: &mut [f64]) {
3535

3636
/// Trait that provides simple descriptive statistics on a univariate set of numeric samples.
3737
pub trait Stats {
38-
3938
/// Sum of the samples.
4039
///
4140
/// Note: this method sacrifices performance at the altar of accuracy

src/libcore/build.rs renamed to src/test/compile-fail/issue-32829.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![deny(warnings)]
11+
// error-pattern: calls in statics are limited
12+
13+
static S : u64 = { { panic!("foo"); 0 } };
1214

1315
fn main() {
14-
// Remove this whenever snapshots and rustbuild nightlies are synced.
15-
println!("cargo:rustc-cfg=cargobuild");
16-
println!("cargo:rerun-if-changed=build.rs")
16+
println!("{:?}", S);
1717
}
File renamed without changes.

0 commit comments

Comments
 (0)