Skip to content

Commit 0c482c6

Browse files
committed
---
yaml --- r: 193279 b: refs/heads/beta c: 4dad907 h: refs/heads/master i: 193277: ccad6e4 193275: ada8813 193271: 5dd6ca6 193263: 42370c6 193247: 2f5e88b 193215: 1acd918 193151: c7a3965 193023: e16fc4c v: v3
1 parent 0eabe9a commit 0c482c6

Some content is hidden

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

83 files changed

+608
-1149
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: ef8b20a564bab2050403f2f5c1dab90e0941adf7
34+
refs/heads/beta: 4dad9077cc1c0ad00c23ab74a9bae4c0871e4822
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: de8a23bbc3a7b9cbd7574b5b91a34af59bf030e6

branches/beta/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ then
875875
| cut -d ' ' -f 2)
876876

877877
case $CFG_CLANG_VERSION in
878-
(3.2* | 3.3* | 3.4* | 3.5* | 3.6*)
878+
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* | 3.5* | 3.6*)
879879
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
880880
if [ -z "$CC" ]
881881
then

branches/beta/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/beta/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/beta/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/beta/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/beta/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/beta/src/libcollections/str.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,9 +1455,9 @@ pub trait StrExt: Index<RangeFull, Output = str> {
14551455
///
14561456
/// `is_cjk` determines behavior for characters in the Ambiguous category: if `is_cjk` is
14571457
/// `true`, these are 2 columns wide; otherwise, they are 1. In CJK locales, `is_cjk` should be
1458-
/// `true`, else it should be `false`.
1459-
/// [Unicode Standard Annex #11](http://www.unicode.org/reports/tr11/) recommends that these
1460-
/// characters be treated as 1 column (i.e., `is_cjk = false`) if the locale is unknown.
1458+
/// `true`, else it should be `false`. [Unicode Standard Annex
1459+
/// #11](http://www.unicode.org/reports/tr11/) recommends that these characters be treated as 1
1460+
/// column (i.e., `is_cjk` = `false`) if the locale is unknown.
14611461
#[unstable(feature = "collections",
14621462
reason = "this functionality may only be provided by libunicode")]
14631463
fn width(&self, is_cjk: bool) -> usize {

branches/beta/src/libcore/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ impl Display for char {
700700
impl<T> Pointer for *const T {
701701
fn fmt(&self, f: &mut Formatter) -> Result {
702702
f.flags |= 1 << (FlagV1::Alternate as u32);
703-
let ret = LowerHex::fmt(&(*self as usize), f);
703+
let ret = LowerHex::fmt(&(*self as u32), f);
704704
f.flags &= !(1 << (FlagV1::Alternate as u32));
705705
ret
706706
}

branches/beta/src/libcore/iter.rs

Lines changed: 39 additions & 21 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::Sized;
71+
use marker::{Send, Sized, Sync};
7272
use usize;
7373

7474
/// An interface for dealing with "external iterators". These types of iterators
@@ -1783,6 +1783,10 @@ 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+
17861790
impl<I: Iterator + Clone> Clone for Peekable<I> where I::Item: Clone {
17871791
fn clone(&self) -> Peekable<I> {
17881792
Peekable {
@@ -2870,10 +2874,10 @@ pub mod order {
28702874
use super::Iterator;
28712875

28722876
/// Compare `a` and `b` for equality using `Eq`
2873-
pub fn equals<A, L, R>(mut a: L, mut b: R) -> bool where
2877+
pub fn equals<A, T, S>(mut a: T, mut b: S) -> bool where
28742878
A: Eq,
2875-
L: Iterator<Item=A>,
2876-
R: Iterator<Item=A>,
2879+
T: Iterator<Item=A>,
2880+
S: Iterator<Item=A>,
28772881
{
28782882
loop {
28792883
match (a.next(), b.next()) {
@@ -2885,10 +2889,10 @@ pub mod order {
28852889
}
28862890

28872891
/// Order `a` and `b` lexicographically using `Ord`
2888-
pub fn cmp<A, L, R>(mut a: L, mut b: R) -> cmp::Ordering where
2892+
pub fn cmp<A, T, S>(mut a: T, mut b: S) -> cmp::Ordering where
28892893
A: Ord,
2890-
L: Iterator<Item=A>,
2891-
R: Iterator<Item=A>,
2894+
T: Iterator<Item=A>,
2895+
S: Iterator<Item=A>,
28922896
{
28932897
loop {
28942898
match (a.next(), b.next()) {
@@ -2904,8 +2908,10 @@ pub mod order {
29042908
}
29052909

29062910
/// Order `a` and `b` lexicographically using `PartialOrd`
2907-
pub fn partial_cmp<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> Option<cmp::Ordering> where
2908-
L::Item: PartialOrd<R::Item>
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>,
29092915
{
29102916
loop {
29112917
match (a.next(), b.next()) {
@@ -2921,8 +2927,10 @@ pub mod order {
29212927
}
29222928

29232929
/// Compare `a` and `b` for equality (Using partial equality, `PartialEq`)
2924-
pub fn eq<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2925-
L::Item: PartialEq<R::Item>,
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>,
29262934
{
29272935
loop {
29282936
match (a.next(), b.next()) {
@@ -2934,8 +2942,10 @@ pub mod order {
29342942
}
29352943

29362944
/// Compare `a` and `b` for nonequality (Using partial equality, `PartialEq`)
2937-
pub fn ne<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2938-
L::Item: PartialEq<R::Item>,
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>,
29392949
{
29402950
loop {
29412951
match (a.next(), b.next()) {
@@ -2947,8 +2957,10 @@ pub mod order {
29472957
}
29482958

29492959
/// Return `a` < `b` lexicographically (Using partial order, `PartialOrd`)
2950-
pub fn lt<R: Iterator, L: Iterator>(mut a: L, mut b: R) -> bool where
2951-
L::Item: PartialOrd<R::Item>,
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>,
29522964
{
29532965
loop {
29542966
match (a.next(), b.next()) {
@@ -2961,8 +2973,10 @@ pub mod order {
29612973
}
29622974

29632975
/// Return `a` <= `b` lexicographically (Using partial order, `PartialOrd`)
2964-
pub fn le<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2965-
L::Item: PartialOrd<R::Item>,
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>,
29662980
{
29672981
loop {
29682982
match (a.next(), b.next()) {
@@ -2975,8 +2989,10 @@ pub mod order {
29752989
}
29762990

29772991
/// Return `a` > `b` lexicographically (Using partial order, `PartialOrd`)
2978-
pub fn gt<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2979-
L::Item: PartialOrd<R::Item>,
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>,
29802996
{
29812997
loop {
29822998
match (a.next(), b.next()) {
@@ -2989,8 +3005,10 @@ pub mod order {
29893005
}
29903006

29913007
/// Return `a` >= `b` lexicographically (Using partial order, `PartialOrd`)
2992-
pub fn ge<L: Iterator, R: Iterator>(mut a: L, mut b: R) -> bool where
2993-
L::Item: PartialOrd<R::Item>,
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>,
29943012
{
29953013
loop {
29963014
match (a.next(), b.next()) {

branches/beta/src/libcore/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
//! distribution.
4040
//!
4141
//! * `rust_begin_unwind` - This function takes three arguments, a
42-
//! `fmt::Arguments`, a `&str`, and a `usize`. These three arguments dictate
42+
//! `fmt::Arguments`, a `&str`, and a `uint`. These three arguments dictate
4343
//! the panic message, the file at which panic was invoked, and the line.
4444
//! It is up to consumers of this core library to define this panic
4545
//! function; it is only required to never return.
@@ -88,12 +88,14 @@ mod int_macros;
8888
#[macro_use]
8989
mod uint_macros;
9090

91+
#[path = "num/int.rs"] pub mod int;
9192
#[path = "num/isize.rs"] pub mod isize;
9293
#[path = "num/i8.rs"] pub mod i8;
9394
#[path = "num/i16.rs"] pub mod i16;
9495
#[path = "num/i32.rs"] pub mod i32;
9596
#[path = "num/i64.rs"] pub mod i64;
9697

98+
#[path = "num/uint.rs"] pub mod uint;
9799
#[path = "num/usize.rs"] pub mod usize;
98100
#[path = "num/u8.rs"] pub mod u8;
99101
#[path = "num/u16.rs"] pub mod u16;

branches/beta/src/libcore/num/int.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
//! Deprecated: replaced by `isize`.
12+
//!
13+
//! The rollout of the new type will gradually take place over the
14+
//! alpha cycle along with the development of clearer conventions
15+
//! around integer types.
16+
17+
#![unstable(feature = "core")]
18+
#![deprecated(since = "1.0.0", reason = "replaced by isize")]
19+
20+
#[cfg(target_pointer_width = "32")] int_module! { int, 32 }
21+
#[cfg(target_pointer_width = "64")] int_module! { int, 64 }

branches/beta/src/libcore/num/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,10 +372,9 @@ pub trait Int
372372
#[unstable(feature = "core",
373373
reason = "pending integer conventions")]
374374
#[inline]
375-
fn pow(self, mut exp: u32) -> Self {
375+
fn pow(self, mut exp: uint) -> Self {
376376
let mut base = self;
377377
let mut acc: Self = Int::one();
378-
379378
while exp > 0 {
380379
if (exp & 1) == 1 {
381380
acc = acc * base;
Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -8,22 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// Test transitive analysis for associated types. Collected types
12-
// should be normalized and new obligations generated.
11+
//! Deprecated: replaced by `usize`.
12+
//!
13+
//! The rollout of the new type will gradually take place over the
14+
//! alpha cycle along with the development of clearer conventions
15+
//! around integer types.
1316
14-
trait Foo {
15-
type A;
16-
fn foo(&self) {}
17-
}
17+
#![unstable(feature = "core")]
18+
#![deprecated(since = "1.0.0", reason = "replaced by usize")]
1819

19-
impl Foo for usize {
20-
type A = usize;
21-
}
22-
23-
struct Bar<T: Foo> { inner: T::A }
24-
25-
fn is_send<T: Send>() {}
26-
27-
fn main() {
28-
is_send::<Bar<usize>>();
29-
}
20+
uint_module! { uint, int, ::int::BITS }

0 commit comments

Comments
 (0)