Skip to content

Commit 8a69110

Browse files
committed
Auto merge of #22895 - Manishearth:rollup, r=Manishearth
r? @Manishearth
2 parents 6f8d831 + 0775959 commit 8a69110

37 files changed

+247
-327
lines changed

src/compiletest/compiletest.rs

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#![feature(std_misc)]
2121
#![feature(test)]
2222
#![feature(unicode)]
23-
#![feature(env)]
2423
#![feature(core)]
2524

2625
#![deny(warnings)]

src/doc/intro.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ use std::thread::Thread;
536536
537537
fn main() {
538538
let numbers = vec![1, 2, 3];
539-
539+
540540
let guards: Vec<_> = (0..3).map(|i| {
541541
Thread::scoped(move || {
542542
println!("{}", numbers[i]);
@@ -565,7 +565,7 @@ while retaining safety. The answer is iterators:
565565
```{rust}
566566
let vec = vec![1, 2, 3];
567567
568-
for x in vec.iter() {
568+
for x in &vec {
569569
println!("{}", x);
570570
}
571571
```

src/doc/reference.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3765,9 +3765,9 @@ An example of creating and calling a closure:
37653765
```rust
37663766
let captured_var = 10;
37673767

3768-
let closure_no_args = |&:| println!("captured_var={}", captured_var);
3768+
let closure_no_args = || println!("captured_var={}", captured_var);
37693769

3770-
let closure_args = |&: arg: i32| -> i32 {
3770+
let closure_args = |arg: i32| -> i32 {
37713771
println!("captured_var={}, arg={}", captured_var, arg);
37723772
arg // Note lack of semicolon after 'arg'
37733773
};

src/doc/trpl/installing-rust.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ If you've got Rust installed, you can open up a shell, and type this:
7070
$ rustc --version
7171
```
7272

73-
You should see some output that looks something like this:
73+
You should see the version number, commit hash, commit date and build date:
7474

7575
```bash
76-
rustc 1.0.0-nightly (f11f3e7ba 2015-01-04 20:02:14 +0000)
76+
rustc 1.0.0-nightly (f11f3e7ba 2015-01-04) (built 2015-01-06)
7777
```
7878

7979
If you did, Rust has been installed successfully! Congrats!

src/doc/trpl/plugins.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ extern crate rustc;
7171
use syntax::codemap::Span;
7272
use syntax::parse::token;
7373
use syntax::ast::{TokenTree, TtToken};
74-
use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacExpr};
75-
use syntax::ext::build::AstBuilder; // trait for expr_uint
74+
use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager};
75+
use syntax::ext::build::AstBuilder; // trait for expr_usize
7676
use rustc::plugin::Registry;
7777
7878
fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
@@ -107,7 +107,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
107107
}
108108
}
109109
110-
MacExpr::new(cx.expr_uint(sp, total))
110+
MacEager::expr(cx.expr_usize(sp, total))
111111
}
112112
113113
#[plugin_registrar]
@@ -183,7 +183,7 @@ with
183183
[`syntax::print::pprust::*_to_string`](http://doc.rust-lang.org/syntax/print/pprust/index.html#functions).
184184

185185
The example above produced an integer literal using
186-
[`AstBuilder::expr_uint`](../syntax/ext/build/trait.AstBuilder.html#tymethod.expr_uint).
186+
[`AstBuilder::expr_usize`](../syntax/ext/build/trait.AstBuilder.html#tymethod.expr_usize).
187187
As an alternative to the `AstBuilder` trait, `libsyntax` provides a set of
188188
[quasiquote macros](../syntax/ext/quote/index.html). They are undocumented and
189189
very rough around the edges. However, the implementation may be a good

src/libcore/iter.rs

+20-34
Original file line numberDiff line numberDiff line change
@@ -2874,10 +2874,10 @@ pub mod order {
28742874
use super::Iterator;
28752875

28762876
/// Compare `a` and `b` for equality using `Eq`
2877-
pub fn equals<A, T, S>(mut a: T, mut b: S) -> bool where
2877+
pub fn equals<A, L, R>(mut a: L, mut b: R) -> bool where
28782878
A: Eq,
2879-
T: Iterator<Item=A>,
2880-
S: Iterator<Item=A>,
2879+
L: Iterator<Item=A>,
2880+
R: Iterator<Item=A>,
28812881
{
28822882
loop {
28832883
match (a.next(), b.next()) {
@@ -2889,10 +2889,10 @@ pub mod order {
28892889
}
28902890

28912891
/// Order `a` and `b` lexicographically using `Ord`
2892-
pub fn cmp<A, T, S>(mut a: T, mut b: S) -> cmp::Ordering where
2892+
pub fn cmp<A, L, R>(mut a: L, mut b: R) -> cmp::Ordering where
28932893
A: Ord,
2894-
T: Iterator<Item=A>,
2895-
S: Iterator<Item=A>,
2894+
L: Iterator<Item=A>,
2895+
R: Iterator<Item=A>,
28962896
{
28972897
loop {
28982898
match (a.next(), b.next()) {
@@ -2908,10 +2908,8 @@ pub mod order {
29082908
}
29092909

29102910
/// Order `a` and `b` lexicographically using `PartialOrd`
2911-
pub fn partial_cmp<A, T, S>(mut a: T, mut b: S) -> Option<cmp::Ordering> where
2912-
A: PartialOrd,
2913-
T: Iterator<Item=A>,
2914-
S: Iterator<Item=A>,
2911+
pub fn partial_cmp<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> Option<cmp::Ordering> where
2912+
L::Item: PartialOrd<R::Item>
29152913
{
29162914
loop {
29172915
match (a.next(), b.next()) {
@@ -2927,10 +2925,8 @@ pub mod order {
29272925
}
29282926

29292927
/// Compare `a` and `b` for equality (Using partial equality, `PartialEq`)
2930-
pub fn eq<A, B, L, R>(mut a: L, mut b: R) -> bool where
2931-
A: PartialEq<B>,
2932-
L: Iterator<Item=A>,
2933-
R: Iterator<Item=B>,
2928+
pub fn eq<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2929+
L::Item: PartialEq<R::Item>,
29342930
{
29352931
loop {
29362932
match (a.next(), b.next()) {
@@ -2942,10 +2938,8 @@ pub mod order {
29422938
}
29432939

29442940
/// Compare `a` and `b` for nonequality (Using partial equality, `PartialEq`)
2945-
pub fn ne<A, B, L, R>(mut a: L, mut b: R) -> bool where
2946-
A: PartialEq<B>,
2947-
L: Iterator<Item=A>,
2948-
R: Iterator<Item=B>,
2941+
pub fn ne<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2942+
L::Item: PartialEq<R::Item>,
29492943
{
29502944
loop {
29512945
match (a.next(), b.next()) {
@@ -2957,10 +2951,8 @@ pub mod order {
29572951
}
29582952

29592953
/// Return `a` < `b` lexicographically (Using partial order, `PartialOrd`)
2960-
pub fn lt<A, T, S>(mut a: T, mut b: S) -> bool where
2961-
A: PartialOrd,
2962-
T: Iterator<Item=A>,
2963-
S: Iterator<Item=A>,
2954+
pub fn lt<R: Iterator, L: Iterator>(mut a: L, mut b: R) -> bool where
2955+
L::Item: PartialOrd<R::Item>,
29642956
{
29652957
loop {
29662958
match (a.next(), b.next()) {
@@ -2973,10 +2965,8 @@ pub mod order {
29732965
}
29742966

29752967
/// Return `a` <= `b` lexicographically (Using partial order, `PartialOrd`)
2976-
pub fn le<A, T, S>(mut a: T, mut b: S) -> bool where
2977-
A: PartialOrd,
2978-
T: Iterator<Item=A>,
2979-
S: Iterator<Item=A>,
2968+
pub fn le<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2969+
L::Item: PartialOrd<R::Item>,
29802970
{
29812971
loop {
29822972
match (a.next(), b.next()) {
@@ -2989,10 +2979,8 @@ pub mod order {
29892979
}
29902980

29912981
/// Return `a` > `b` lexicographically (Using partial order, `PartialOrd`)
2992-
pub fn gt<A, T, S>(mut a: T, mut b: S) -> bool where
2993-
A: PartialOrd,
2994-
T: Iterator<Item=A>,
2995-
S: Iterator<Item=A>,
2982+
pub fn gt<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2983+
L::Item: PartialOrd<R::Item>,
29962984
{
29972985
loop {
29982986
match (a.next(), b.next()) {
@@ -3005,10 +2993,8 @@ pub mod order {
30052993
}
30062994

30072995
/// Return `a` >= `b` lexicographically (Using partial order, `PartialOrd`)
3008-
pub fn ge<A, T, S>(mut a: T, mut b: S) -> bool where
3009-
A: PartialOrd,
3010-
T: Iterator<Item=A>,
3011-
S: Iterator<Item=A>,
2996+
pub fn ge<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2997+
L::Item: PartialOrd<R::Item>,
30122998
{
30132999
loop {
30143000
match (a.next(), b.next()) {

src/liblog/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@
174174
#![feature(core)]
175175
#![feature(old_io)]
176176
#![feature(std_misc)]
177-
#![feature(env)]
178177

179178
use std::boxed;
180179
use std::cell::RefCell;

src/librustc/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#![feature(int_uint)]
3232
#![feature(old_io)]
3333
#![feature(libc)]
34-
#![feature(env)]
3534
#![feature(old_path)]
3635
#![feature(quote)]
3736
#![feature(rustc_diagnostic_macros)]

src/librustc/middle/const_eval.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ pub fn eval_const_expr_partial<'tcx>(tcx: &ty::ctxt<'tcx>,
257257
}
258258
}
259259
(Ok(const_int(a)), Ok(const_int(b))) => {
260-
let is_a_min_value = |&:| {
260+
let is_a_min_value = || {
261261
let int_ty = match ty::expr_ty_opt(tcx, e).map(|ty| &ty.sty) {
262262
Some(&ty::ty_int(int_ty)) => int_ty,
263263
_ => return false

src/librustc_back/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
#![feature(old_path)]
4141
#![feature(rustc_private)]
4242
#![feature(staged_api)]
43-
#![feature(env)]
4443
#![feature(path)]
4544

4645
extern crate syntax;

src/librustc_driver/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#![feature(box_syntax)]
2727
#![feature(collections)]
2828
#![feature(core)]
29-
#![feature(env)]
3029
#![feature(int_uint)]
3130
#![feature(old_io)]
3231
#![feature(libc)]
@@ -38,6 +37,7 @@
3837
#![feature(unsafe_destructor)]
3938
#![feature(staged_api)]
4039
#![feature(unicode)]
40+
#![feature(exit_status)]
4141

4242
extern crate arena;
4343
extern crate flate;

src/librustc_trans/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#![feature(core)]
3131
#![feature(int_uint)]
3232
#![feature(old_io)]
33-
#![feature(env)]
3433
#![feature(libc)]
3534
#![feature(old_path)]
3635
#![feature(quote)]

src/librustc_typeck/check/dropck.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn iterate_over_potentially_unsafe_regions_in_type<'a, 'tcx>(
4545
scope: region::CodeExtent,
4646
depth: uint)
4747
{
48-
let origin = |&:| infer::SubregionOrigin::SafeDestructor(span);
48+
let origin = || infer::SubregionOrigin::SafeDestructor(span);
4949
let mut walker = ty_root.walk();
5050
let opt_phantom_data_def_id = rcx.tcx().lang_items.phantom_data();
5151

src/librustdoc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#![feature(box_syntax)]
2323
#![feature(collections)]
2424
#![feature(core)]
25-
#![feature(env)]
25+
#![feature(exit_status)]
2626
#![feature(int_uint)]
2727
#![feature(old_io)]
2828
#![feature(libc)]

0 commit comments

Comments
 (0)