Skip to content

Commit d810355

Browse files
committed
---
yaml --- r: 187495 b: refs/heads/try c: 2b8207a h: refs/heads/master i: 187493: 5b44d8a 187491: 7be8ea5 187487: 837502f v: v3
1 parent cd80296 commit d810355

File tree

41 files changed

+347
-308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+347
-308
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: b4c965ee803a4521d8b4575f634e036f93e408f3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5-
refs/heads/try: 2b27dfd30ac5a95608d49e3425a3ff40f8da7dee
5+
refs/heads/try: 2b8207a56d74bf97d93db2aad962c7ce56d3b98a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/compiletest/compiletest.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#![feature(std_misc)]
2121
#![feature(test)]
2222
#![feature(unicode)]
23+
#![feature(env)]
2324
#![feature(core)]
2425

2526
#![deny(warnings)]

branches/try/src/doc/intro.md

Lines changed: 2 additions & 2 deletions
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 {
568+
for x in vec.iter() {
569569
println!("{}", x);
570570
}
571571
```

branches/try/src/doc/reference.md

Lines changed: 2 additions & 2 deletions
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
};

branches/try/src/doc/trpl/installing-rust.md

Lines changed: 2 additions & 2 deletions
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 the version number, commit hash, commit date and build date:
73+
You should see some output that looks something like this:
7474

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

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

branches/try/src/doc/trpl/plugins.md

Lines changed: 4 additions & 4 deletions
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, MacEager};
75-
use syntax::ext::build::AstBuilder; // trait for expr_usize
74+
use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacExpr};
75+
use syntax::ext::build::AstBuilder; // trait for expr_uint
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-
MacEager::expr(cx.expr_usize(sp, total))
110+
MacExpr::new(cx.expr_uint(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_usize`](../syntax/ext/build/trait.AstBuilder.html#tymethod.expr_usize).
186+
[`AstBuilder::expr_uint`](../syntax/ext/build/trait.AstBuilder.html#tymethod.expr_uint).
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

branches/try/src/libcore/iter.rs

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ use num::{ToPrimitive, Int};
6868
use ops::{Add, Deref, FnMut};
6969
use option::Option;
7070
use option::Option::{Some, None};
71-
use marker::{Send, Sized, Sync};
71+
use marker::Sized;
7272
use usize;
7373

7474
/// An interface for dealing with "external iterators". These types of iterators
@@ -1783,10 +1783,6 @@ pub struct Peekable<I: Iterator> {
17831783
peeked: Option<I::Item>,
17841784
}
17851785

1786-
// FIXME: after #22828 being fixed, the following unsafe impl should be removed
1787-
unsafe impl<I: Iterator> Sync for Peekable<I> where I: Sync, I::Item: Sync {}
1788-
unsafe impl<I: Iterator> Send for Peekable<I> where I: Send, I::Item: Send {}
1789-
17901786
impl<I: Iterator + Clone> Clone for Peekable<I> where I::Item: Clone {
17911787
fn clone(&self) -> Peekable<I> {
17921788
Peekable {
@@ -2874,10 +2870,10 @@ pub mod order {
28742870
use super::Iterator;
28752871

28762872
/// Compare `a` and `b` for equality using `Eq`
2877-
pub fn equals<A, L, R>(mut a: L, mut b: R) -> bool where
2873+
pub fn equals<A, T, S>(mut a: T, mut b: S) -> bool where
28782874
A: Eq,
2879-
L: Iterator<Item=A>,
2880-
R: Iterator<Item=A>,
2875+
T: Iterator<Item=A>,
2876+
S: Iterator<Item=A>,
28812877
{
28822878
loop {
28832879
match (a.next(), b.next()) {
@@ -2889,10 +2885,10 @@ pub mod order {
28892885
}
28902886

28912887
/// Order `a` and `b` lexicographically using `Ord`
2892-
pub fn cmp<A, L, R>(mut a: L, mut b: R) -> cmp::Ordering where
2888+
pub fn cmp<A, T, S>(mut a: T, mut b: S) -> cmp::Ordering where
28932889
A: Ord,
2894-
L: Iterator<Item=A>,
2895-
R: Iterator<Item=A>,
2890+
T: Iterator<Item=A>,
2891+
S: Iterator<Item=A>,
28962892
{
28972893
loop {
28982894
match (a.next(), b.next()) {
@@ -2908,8 +2904,10 @@ pub mod order {
29082904
}
29092905

29102906
/// Order `a` and `b` lexicographically using `PartialOrd`
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>
2907+
pub fn partial_cmp<A, T, S>(mut a: T, mut b: S) -> Option<cmp::Ordering> where
2908+
A: PartialOrd,
2909+
T: Iterator<Item=A>,
2910+
S: Iterator<Item=A>,
29132911
{
29142912
loop {
29152913
match (a.next(), b.next()) {
@@ -2925,8 +2923,10 @@ pub mod order {
29252923
}
29262924

29272925
/// Compare `a` and `b` for equality (Using partial equality, `PartialEq`)
2928-
pub fn eq<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2929-
L::Item: PartialEq<R::Item>,
2926+
pub fn eq<A, B, L, R>(mut a: L, mut b: R) -> bool where
2927+
A: PartialEq<B>,
2928+
L: Iterator<Item=A>,
2929+
R: Iterator<Item=B>,
29302930
{
29312931
loop {
29322932
match (a.next(), b.next()) {
@@ -2938,8 +2938,10 @@ pub mod order {
29382938
}
29392939

29402940
/// Compare `a` and `b` for nonequality (Using partial equality, `PartialEq`)
2941-
pub fn ne<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2942-
L::Item: PartialEq<R::Item>,
2941+
pub fn ne<A, B, L, R>(mut a: L, mut b: R) -> bool where
2942+
A: PartialEq<B>,
2943+
L: Iterator<Item=A>,
2944+
R: Iterator<Item=B>,
29432945
{
29442946
loop {
29452947
match (a.next(), b.next()) {
@@ -2951,8 +2953,10 @@ pub mod order {
29512953
}
29522954

29532955
/// Return `a` < `b` lexicographically (Using partial order, `PartialOrd`)
2954-
pub fn lt<R: Iterator, L: Iterator>(mut a: L, mut b: R) -> bool where
2955-
L::Item: PartialOrd<R::Item>,
2956+
pub fn lt<A, T, S>(mut a: T, mut b: S) -> bool where
2957+
A: PartialOrd,
2958+
T: Iterator<Item=A>,
2959+
S: Iterator<Item=A>,
29562960
{
29572961
loop {
29582962
match (a.next(), b.next()) {
@@ -2965,8 +2969,10 @@ pub mod order {
29652969
}
29662970

29672971
/// Return `a` <= `b` lexicographically (Using partial order, `PartialOrd`)
2968-
pub fn le<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2969-
L::Item: PartialOrd<R::Item>,
2972+
pub fn le<A, T, S>(mut a: T, mut b: S) -> bool where
2973+
A: PartialOrd,
2974+
T: Iterator<Item=A>,
2975+
S: Iterator<Item=A>,
29702976
{
29712977
loop {
29722978
match (a.next(), b.next()) {
@@ -2979,8 +2985,10 @@ pub mod order {
29792985
}
29802986

29812987
/// Return `a` > `b` lexicographically (Using partial order, `PartialOrd`)
2982-
pub fn gt<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2983-
L::Item: PartialOrd<R::Item>,
2988+
pub fn gt<A, T, S>(mut a: T, mut b: S) -> bool where
2989+
A: PartialOrd,
2990+
T: Iterator<Item=A>,
2991+
S: Iterator<Item=A>,
29842992
{
29852993
loop {
29862994
match (a.next(), b.next()) {
@@ -2993,8 +3001,10 @@ pub mod order {
29933001
}
29943002

29953003
/// Return `a` >= `b` lexicographically (Using partial order, `PartialOrd`)
2996-
pub fn ge<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2997-
L::Item: PartialOrd<R::Item>,
3004+
pub fn ge<A, T, S>(mut a: T, mut b: S) -> bool where
3005+
A: PartialOrd,
3006+
T: Iterator<Item=A>,
3007+
S: Iterator<Item=A>,
29983008
{
29993009
loop {
30003010
match (a.next(), b.next()) {

branches/try/src/liblog/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
#![feature(core)]
175175
#![feature(old_io)]
176176
#![feature(std_misc)]
177+
#![feature(env)]
177178

178179
use std::boxed;
179180
use std::cell::RefCell;

branches/try/src/librustc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#![feature(int_uint)]
3232
#![feature(old_io)]
3333
#![feature(libc)]
34+
#![feature(env)]
3435
#![feature(old_path)]
3536
#![feature(quote)]
3637
#![feature(rustc_diagnostic_macros)]

branches/try/src/librustc/middle/const_eval.rs

Lines changed: 1 addition & 1 deletion
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

branches/try/src/librustc_back/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#![feature(old_path)]
4141
#![feature(rustc_private)]
4242
#![feature(staged_api)]
43+
#![feature(env)]
4344
#![feature(path)]
4445

4546
extern crate syntax;

branches/try/src/librustc_driver/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#![feature(box_syntax)]
2727
#![feature(collections)]
2828
#![feature(core)]
29+
#![feature(env)]
2930
#![feature(int_uint)]
3031
#![feature(old_io)]
3132
#![feature(libc)]
@@ -37,7 +38,6 @@
3738
#![feature(unsafe_destructor)]
3839
#![feature(staged_api)]
3940
#![feature(unicode)]
40-
#![feature(exit_status)]
4141

4242
extern crate arena;
4343
extern crate flate;

branches/try/src/librustc_trans/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#![feature(core)]
3131
#![feature(int_uint)]
3232
#![feature(old_io)]
33+
#![feature(env)]
3334
#![feature(libc)]
3435
#![feature(old_path)]
3536
#![feature(quote)]

branches/try/src/librustc_trans/trans/base.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -433,13 +433,13 @@ pub fn set_inline_hint(f: ValueRef) {
433433
}
434434

435435
pub fn set_llvm_fn_attrs(ccx: &CrateContext, attrs: &[ast::Attribute], llfn: ValueRef) {
436-
use syntax::attr::{find_inline_attr, InlineAttr};
436+
use syntax::attr::*;
437437
// Set the inline hint if there is one
438438
match find_inline_attr(Some(ccx.sess().diagnostic()), attrs) {
439-
InlineAttr::Hint => set_inline_hint(llfn),
440-
InlineAttr::Always => set_always_inline(llfn),
441-
InlineAttr::Never => set_no_inline(llfn),
442-
InlineAttr::None => { /* fallthrough */ }
439+
InlineHint => set_inline_hint(llfn),
440+
InlineAlways => set_always_inline(llfn),
441+
InlineNever => set_no_inline(llfn),
442+
InlineNone => { /* fallthrough */ }
443443
}
444444

445445
for attr in attrs {

branches/try/src/librustc_typeck/check/dropck.rs

Lines changed: 1 addition & 1 deletion
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

branches/try/src/librustdoc/lib.rs

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

0 commit comments

Comments
 (0)