Skip to content

Commit 84cf7c2

Browse files
committed
---
yaml --- r: 157679 b: refs/heads/snap-stage3 c: 936d999 h: refs/heads/master i: 157677: a6e9df5 157675: e9da950 157671: 7ff644f 157663: e4f8975 v: v3
1 parent bf79a43 commit 84cf7c2

File tree

249 files changed

+1653
-1389
lines changed

Some content is hidden

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

249 files changed

+1653
-1389
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 065caf34f5ff29e04605f95d9c5d511af219439a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 00975e041d42b89b14b2655b2891e3348f3ad3f1
4+
refs/heads/snap-stage3: 936d999b5270d186df28123a5dbd6d2bb848bb2c
55
refs/heads/try: 0ee4d8b0b112c608646fa75463ab4dc59132efd9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ endif
3838
# the stamp in the source dir.
3939
$$(LLVM_STAMP_$(1)): $(S)src/rustllvm/llvm-auto-clean-trigger
4040
@$$(call E, make: cleaning llvm)
41-
$(Q)$(MAKE) clean-llvm$(1)
41+
$(Q)$(MAKE) clean-llvm
4242
@$$(call E, make: done cleaning llvm)
4343
touch $$@
4444

branches/snap-stage3/src/doc/complement-bugreport.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ release: 0.12.0
4747
```
4848

4949
Finally, if you can run the offending command under gdb, pasting a stack trace can be
50-
useful; to do so, you will need to set a breakpoint on `rust_panic`.
50+
useful; to do so, you will need to set a breakpoint on `rust_fail`.
5151

5252
# I submitted a bug, but nobody has commented on it!
5353

branches/snap-stage3/src/doc/guide-lifetimes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ a reference.
5656
fn compute_distance(p1: &Point, p2: &Point) -> f64 {
5757
let x_d = p1.x - p2.x;
5858
let y_d = p1.y - p2.y;
59-
(x_d * x_d + y_d * y_d).sqrt()
59+
sqrt(x_d * x_d + y_d * y_d)
6060
}
6161
~~~
6262

branches/snap-stage3/src/doc/reference.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ exposing an API making it possible for it to occur in safe code.
11531153

11541154
* Data races
11551155
* Dereferencing a null/dangling raw pointer
1156-
* Mutating an immutable value/reference without `UnsafeCell`
1156+
* Mutating an immutable value/reference
11571157
* Reads of [undef](http://llvm.org/docs/LangRef.html#undefined-values)
11581158
(uninitialized) memory
11591159
* Breaking the [pointer aliasing
@@ -1166,14 +1166,11 @@ exposing an API making it possible for it to occur in safe code.
11661166
* Using `std::ptr::copy_nonoverlapping_memory` (`memcpy32`/`memcpy64`
11671167
instrinsics) on overlapping buffers
11681168
* Invalid values in primitive types, even in private fields/locals:
1169-
* Dangling/null references or boxes
1169+
* Dangling/null pointers in non-raw pointers, or slices
11701170
* A value other than `false` (0) or `true` (1) in a `bool`
11711171
* A discriminant in an `enum` not included in the type definition
11721172
* A value in a `char` which is a surrogate or above `char::MAX`
11731173
* non-UTF-8 byte sequences in a `str`
1174-
* Unwinding into Rust from foreign code or unwinding from Rust into foreign
1175-
code. Rust's failure system is not compatible with exception handling in
1176-
other languages. Unwinding must be caught and handled at FFI boundaries.
11771174

11781175
##### Behaviour not considered unsafe
11791176

branches/snap-stage3/src/doc/rustdoc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ testing this code, the `fib` function will be included (so it can compile).
221221

222222
Running tests often requires some special configuration to filter tests, find
223223
libraries, or try running ignored examples. The testing framework that rustdoc
224-
uses is built on crate `test`, which is also used when you compile crates with
224+
uses is build on crate `test`, which is also used when you compile crates with
225225
rustc's `--test` flag. Extra arguments can be passed to rustdoc's test harness
226226
with the `--test-args` flag.
227227

branches/snap-stage3/src/grammar/verify.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,20 @@ fn parse_token_list(file: &str) -> HashMap<String, Token> {
5959
"FLOAT_SUFFIX" => id(),
6060
"INT_SUFFIX" => id(),
6161
"SHL" => token::BinOp(token::Shl),
62-
"LBRACE" => token::LBrace,
62+
"LBRACE" => token::OpenDelim(token::Brace),
6363
"RARROW" => token::Rarrow,
6464
"LIT_STR" => token::LitStr(Name(0)),
6565
"DOTDOT" => token::DotDot,
6666
"MOD_SEP" => token::ModSep,
6767
"DOTDOTDOT" => token::DotDotDot,
6868
"NOT" => token::Not,
6969
"AND" => token::BinOp(token::And),
70-
"LPAREN" => token::LParen,
70+
"LPAREN" => token::OpenDelim(token::Paren),
7171
"ANDAND" => token::AndAnd,
7272
"AT" => token::At,
73-
"LBRACKET" => token::LBracket,
73+
"LBRACKET" => token::OpenDelim(token::Bracket),
7474
"LIT_STR_RAW" => token::LitStrRaw(Name(0), 0),
75-
"RPAREN" => token::RParen,
75+
"RPAREN" => token::CloseDelim(token::Paren),
7676
"SLASH" => token::BinOp(token::Slash),
7777
"COMMA" => token::Comma,
7878
"LIFETIME" => token::Lifetime(ast::Ident { name: Name(0), ctxt: 0 }),
@@ -83,15 +83,15 @@ fn parse_token_list(file: &str) -> HashMap<String, Token> {
8383
"LIT_CHAR" => token::LitChar(Name(0)),
8484
"LIT_BYTE" => token::LitByte(Name(0)),
8585
"EQ" => token::Eq,
86-
"RBRACKET" => token::RBracket,
86+
"RBRACKET" => token::CloseDelim(token::Bracket),
8787
"COMMENT" => token::Comment,
8888
"DOC_COMMENT" => token::DocComment(Name(0)),
8989
"DOT" => token::Dot,
9090
"EQEQ" => token::EqEq,
9191
"NE" => token::Ne,
9292
"GE" => token::Ge,
9393
"PERCENT" => token::BinOp(token::Percent),
94-
"RBRACE" => token::RBrace,
94+
"RBRACE" => token::CloseDelim(token::Brace),
9595
"BINOP" => token::BinOp(token::Plus),
9696
"POUND" => token::Pound,
9797
"OROR" => token::OrOr,

branches/snap-stage3/src/libarena/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
html_root_url = "http://doc.rust-lang.org/nightly/")]
3030

3131
#![feature(unsafe_destructor)]
32-
#![allow(missing_docs)]
32+
#![allow(missing_doc)]
3333

3434
use std::cell::{Cell, RefCell};
3535
use std::cmp;
@@ -208,13 +208,13 @@ impl Arena {
208208
}
209209

210210
#[inline]
211-
fn alloc_copy<T>(&self, op: || -> T) -> &mut T {
211+
fn alloc_copy<T>(&self, op: || -> T) -> &T {
212212
unsafe {
213213
let ptr = self.alloc_copy_inner(mem::size_of::<T>(),
214214
mem::min_align_of::<T>());
215215
let ptr = ptr as *mut T;
216216
ptr::write(&mut (*ptr), op());
217-
return &mut *ptr;
217+
return &*ptr;
218218
}
219219
}
220220

@@ -262,7 +262,7 @@ impl Arena {
262262
}
263263

264264
#[inline]
265-
fn alloc_noncopy<T>(&self, op: || -> T) -> &mut T {
265+
fn alloc_noncopy<T>(&self, op: || -> T) -> &T {
266266
unsafe {
267267
let tydesc = get_tydesc::<T>();
268268
let (ty_ptr, ptr) =
@@ -279,14 +279,14 @@ impl Arena {
279279
// the object is there.
280280
*ty_ptr = bitpack_tydesc_ptr(tydesc, true);
281281

282-
return &mut *ptr;
282+
return &*ptr;
283283
}
284284
}
285285

286286
/// Allocates a new item in the arena, using `op` to initialize the value,
287287
/// and returns a reference to it.
288288
#[inline]
289-
pub fn alloc<T>(&self, op: || -> T) -> &mut T {
289+
pub fn alloc<T>(&self, op: || -> T) -> &T {
290290
unsafe {
291291
if intrinsics::needs_drop::<T>() {
292292
self.alloc_noncopy(op)
@@ -458,12 +458,12 @@ impl<T> TypedArena<T> {
458458

459459
/// Allocates an object in the `TypedArena`, returning a reference to it.
460460
#[inline]
461-
pub fn alloc(&self, object: T) -> &mut T {
461+
pub fn alloc(&self, object: T) -> &T {
462462
if self.ptr == self.end {
463463
self.grow()
464464
}
465465

466-
let ptr: &mut T = unsafe {
466+
let ptr: &T = unsafe {
467467
let ptr: &mut T = mem::transmute(self.ptr);
468468
ptr::write(ptr, object);
469469
self.ptr.set(self.ptr.get().offset(1));

branches/snap-stage3/src/libcollections/priority_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
//! }
152152
//! ```
153153
154-
#![allow(missing_docs)]
154+
#![allow(missing_doc)]
155155

156156
use core::prelude::*;
157157

branches/snap-stage3/src/libcollections/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub use core::slice::{Found, NotFound};
109109

110110
// Functional utilities
111111

112-
#[allow(missing_docs)]
112+
#[allow(missing_doc)]
113113
pub trait VectorVector<T> for Sized? {
114114
// FIXME #5898: calling these .concat and .connect conflicts with
115115
// StrVector::con{cat,nect}, since they have generic contents.

branches/snap-stage3/src/libcollections/smallintmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! A simple map based on a vector for small integer keys. Space requirements
1212
//! are O(highest integer key).
1313
14-
#![allow(missing_docs)]
14+
#![allow(missing_doc)]
1515

1616
use core::prelude::*;
1717

branches/snap-stage3/src/libcollections/str.rs

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,6 +1677,40 @@ mod tests {
16771677
assert_eq!(pos, p.len());
16781678
}
16791679

1680+
#[test]
1681+
fn test_split_char_iterator() {
1682+
let data = "\nMäry häd ä little lämb\nLittle lämb\n";
1683+
1684+
let split: Vec<&str> = data.split(' ').collect();
1685+
assert_eq!( split, vec!["\nMäry", "häd", "ä", "little", "lämb\nLittle", "lämb\n"]);
1686+
1687+
let mut rsplit: Vec<&str> = data.split(' ').rev().collect();
1688+
rsplit.reverse();
1689+
assert_eq!(rsplit, vec!["\nMäry", "häd", "ä", "little", "lämb\nLittle", "lämb\n"]);
1690+
1691+
let split: Vec<&str> = data.split(|c: char| c == ' ').collect();
1692+
assert_eq!( split, vec!["\nMäry", "häd", "ä", "little", "lämb\nLittle", "lämb\n"]);
1693+
1694+
let mut rsplit: Vec<&str> = data.split(|c: char| c == ' ').rev().collect();
1695+
rsplit.reverse();
1696+
assert_eq!(rsplit, vec!["\nMäry", "häd", "ä", "little", "lämb\nLittle", "lämb\n"]);
1697+
1698+
// Unicode
1699+
let split: Vec<&str> = data.split('ä').collect();
1700+
assert_eq!( split, vec!["\nM", "ry h", "d ", " little l", "mb\nLittle l", "mb\n"]);
1701+
1702+
let mut rsplit: Vec<&str> = data.split('ä').rev().collect();
1703+
rsplit.reverse();
1704+
assert_eq!(rsplit, vec!["\nM", "ry h", "d ", " little l", "mb\nLittle l", "mb\n"]);
1705+
1706+
let split: Vec<&str> = data.split(|c: char| c == 'ä').collect();
1707+
assert_eq!( split, vec!["\nM", "ry h", "d ", " little l", "mb\nLittle l", "mb\n"]);
1708+
1709+
let mut rsplit: Vec<&str> = data.split(|c: char| c == 'ä').rev().collect();
1710+
rsplit.reverse();
1711+
assert_eq!(rsplit, vec!["\nM", "ry h", "d ", " little l", "mb\nLittle l", "mb\n"]);
1712+
}
1713+
16801714
#[test]
16811715
fn test_splitn_char_iterator() {
16821716
let data = "\nMäry häd ä little lämb\nLittle lämb\n";
@@ -1695,6 +1729,28 @@ mod tests {
16951729
assert_eq!(split, vec!["\nM", "ry h", "d ", " little lämb\nLittle lämb\n"]);
16961730
}
16971731

1732+
#[test]
1733+
fn test_rsplitn_char_iterator() {
1734+
let data = "\nMäry häd ä little lämb\nLittle lämb\n";
1735+
1736+
let mut split: Vec<&str> = data.rsplitn(3, ' ').collect();
1737+
split.reverse();
1738+
assert_eq!(split, vec!["\nMäry häd ä", "little", "lämb\nLittle", "lämb\n"]);
1739+
1740+
let mut split: Vec<&str> = data.rsplitn(3, |c: char| c == ' ').collect();
1741+
split.reverse();
1742+
assert_eq!(split, vec!["\nMäry häd ä", "little", "lämb\nLittle", "lämb\n"]);
1743+
1744+
// Unicode
1745+
let mut split: Vec<&str> = data.rsplitn(3, 'ä').collect();
1746+
split.reverse();
1747+
assert_eq!(split, vec!["\nMäry häd ", " little l", "mb\nLittle l", "mb\n"]);
1748+
1749+
let mut split: Vec<&str> = data.rsplitn(3, |c: char| c == 'ä').collect();
1750+
split.reverse();
1751+
assert_eq!(split, vec!["\nMäry häd ", " little l", "mb\nLittle l", "mb\n"]);
1752+
}
1753+
16981754
#[test]
16991755
fn test_split_char_iterator_no_trailing() {
17001756
let data = "\nMäry häd ä little lämb\nLittle lämb\n";
@@ -1706,6 +1762,19 @@ mod tests {
17061762
assert_eq!(split, vec!["", "Märy häd ä little lämb", "Little lämb"]);
17071763
}
17081764

1765+
#[test]
1766+
fn test_rev_split_char_iterator_no_trailing() {
1767+
let data = "\nMäry häd ä little lämb\nLittle lämb\n";
1768+
1769+
let mut split: Vec<&str> = data.split('\n').rev().collect();
1770+
split.reverse();
1771+
assert_eq!(split, vec!["", "Märy häd ä little lämb", "Little lämb", ""]);
1772+
1773+
let mut split: Vec<&str> = data.split_terminator('\n').rev().collect();
1774+
split.reverse();
1775+
assert_eq!(split, vec!["", "Märy häd ä little lämb", "Little lämb"]);
1776+
}
1777+
17091778
#[test]
17101779
fn test_words() {
17111780
let data = "\n \tMäry häd\tä little lämb\nLittle lämb\n";

branches/snap-stage3/src/libcollections/string.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -744,11 +744,6 @@ impl ops::Slice<uint, str> for String {
744744
}
745745
}
746746

747-
#[experimental = "waiting on Deref stabilization"]
748-
impl ops::Deref<str> for String {
749-
fn deref<'a>(&'a self) -> &'a str { self.as_slice() }
750-
}
751-
752747
/// Wrapper type providing a `&String` reference via `Deref`.
753748
#[experimental]
754749
pub struct DerefString<'a> {

0 commit comments

Comments
 (0)