Skip to content

Commit 1879947

Browse files
committed
---
yaml --- r: 113058 b: refs/heads/try c: 593f6a4 h: refs/heads/master v: v3
1 parent 8fe1646 commit 1879947

Some content is hidden

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

71 files changed

+431
-608
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: abdacecdf86b4b5a4f432560445a24e1c5f4751b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 922c420fcd4dfbfc7e3bce4dd20d9b17a20b39f3
5-
refs/heads/try: e0d261e576817817bf3433deee6a1434cec47002
5+
refs/heads/try: 593f6a42d01070c7217c1241e8783b4e908884bb
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/RELEASES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Version 0.10 (April 2014)
6363
documentation index page.
6464
* std: `std::condition` has been removed. All I/O errors are now propagated
6565
through the `Result` type. In order to assist with error handling, a
66-
`try!` macro for unwrapping errors with an early return and a lint for
66+
`try!` macro for unwrapping errors with an early return and an lint for
6767
unused results has been added. See #12039 for more information.
6868
* std: The `vec` module has been renamed to `slice`.
6969
* std: A new vector type, `Vec<T>`, has been added in preparation for DST.

branches/try/src/compiletest/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ fn parse_compile_flags(line: &str) -> Option<~str> {
170170
}
171171

172172
fn parse_run_flags(line: &str) -> Option<~str> {
173-
parse_name_value_directive(line, "run-flags".to_owned())
173+
parse_name_value_directive(line, ~"run-flags")
174174
}
175175

176176
fn parse_debugger_cmd(line: &str) -> Option<~str> {

branches/try/src/doc/guide-lifetimes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ process is called *rooting*.
263263
The previous example demonstrated *rooting*, the process by which the
264264
compiler ensures that managed boxes remain live for the duration of a
265265
borrow. Unfortunately, rooting does not work for borrows of owned
266-
boxes, because it is not possible to have two references to an owned
266+
boxes, because it is not possible to have two references to a owned
267267
box.
268268

269269
For owned boxes, therefore, the compiler will only allow a borrow *if
@@ -462,7 +462,7 @@ of a `f64` as if it were a struct with two fields would be a memory
462462
safety violation.
463463

464464
So, in fact, for every `ref` binding, the compiler will impose the
465-
same rules as the ones we saw for borrowing the interior of an owned
465+
same rules as the ones we saw for borrowing the interior of a owned
466466
box: it must be able to guarantee that the `enum` will not be
467467
overwritten for the duration of the borrow. In fact, the compiler
468468
would accept the example we gave earlier. The example is safe because

branches/try/src/doc/guide-unsafe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ standard library types, e.g. `Cell` and `RefCell`, that provide inner
5656
mutability by replacing compile time guarantees with dynamic checks at
5757
runtime.
5858

59-
An `&mut` reference has a stronger requirement: when an object has an
59+
An `&mut` reference has a stronger requirement: when a object has an
6060
`&mut T` pointing into it, then that `&mut` reference must be the only
6161
such usable path to that object in the whole program. That is, an
6262
`&mut` cannot alias with any other references.

branches/try/src/doc/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Comments in Rust code follow the general C++ style of line and block-comment for
161161
with no nesting of block-comment delimiters.
162162

163163
Line comments beginning with exactly _three_ slashes (`///`), and block
164-
comments beginning with exactly one repeated asterisk in the block-open
164+
comments beginning with a exactly one repeated asterisk in the block-open
165165
sequence (`/**`), are interpreted as a special syntax for `doc`
166166
[attributes](#attributes). That is, they are equivalent to writing
167167
`#[doc="..."]` around the body of the comment (this includes the comment
@@ -365,7 +365,7 @@ of integer literal suffix:
365365
give the literal the corresponding machine type.
366366

367367
The type of an _unsuffixed_ integer literal is determined by type inference.
368-
If an integer type can be _uniquely_ determined from the surrounding program
368+
If a integer type can be _uniquely_ determined from the surrounding program
369369
context, the unsuffixed integer literal has that type. If the program context
370370
underconstrains the type, the unsuffixed integer literal's type is `int`; if
371371
the program context overconstrains the type, it is considered a static type
@@ -2184,7 +2184,7 @@ Supported traits for `deriving` are:
21842184
* `Hash`, to iterate over the bytes in a data type.
21852185
* `Rand`, to create a random instance of a data type.
21862186
* `Default`, to create an empty instance of a data type.
2187-
* `Zero`, to create a zero instance of a numeric data type.
2187+
* `Zero`, to create an zero instance of a numeric data type.
21882188
* `FromPrimitive`, to create an instance from a numeric primitive.
21892189
* `Show`, to format a value using the `{}` formatter.
21902190

branches/try/src/doc/tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ fn eq(xs: &List, ys: &List) -> bool {
11971197
match (xs, ys) {
11981198
// If we have reached the end of both lists, they are equal.
11991199
(&Nil, &Nil) => true,
1200-
// If the current elements of both lists are equal, keep going.
1200+
// If the current element in both lists is equal, keep going.
12011201
(&Cons(x, ~ref next_xs), &Cons(y, ~ref next_ys))
12021202
if x == y => eq(next_xs, next_ys),
12031203
// If the current elements are not equal, the lists are not equal.
@@ -1304,7 +1304,7 @@ fn eq<T: Eq>(xs: &List<T>, ys: &List<T>) -> bool {
13041304
match (xs, ys) {
13051305
// If we have reached the end of both lists, they are equal.
13061306
(&Nil, &Nil) => true,
1307-
// If the current elements of both lists are equal, keep going.
1307+
// If the current element in both lists is equal, keep going.
13081308
(&Cons(ref x, ~ref next_xs), &Cons(ref y, ~ref next_ys))
13091309
if x == y => eq(next_xs, next_ys),
13101310
// If the current elements are not equal, the lists are not equal.
@@ -1333,7 +1333,7 @@ impl<T: Eq> Eq for List<T> {
13331333
match (self, ys) {
13341334
// If we have reached the end of both lists, they are equal.
13351335
(&Nil, &Nil) => true,
1336-
// If the current elements of both lists are equal, keep going.
1336+
// If the current element in both lists is equal, keep going.
13371337
(&Cons(ref x, ~ref next_xs), &Cons(ref y, ~ref next_ys))
13381338
if x == y => next_xs == next_ys,
13391339
// If the current elements are not equal, the lists are not equal.
@@ -2965,7 +2965,7 @@ use farm::*;
29652965
~~~
29662966

29672967
> *Note:* This feature of the compiler is currently gated behind the
2968-
> `#![feature(globs)]` directive. More about these directives can be found in
2968+
> `#[feature(globs)]` directive. More about these directives can be found in
29692969
> the manual.
29702970
29712971
However, that's not all. You can also rename an item while you're bringing it into scope:
@@ -2980,7 +2980,7 @@ fn main() {
29802980
}
29812981
~~~
29822982

2983-
In general, `use` creates a local alias:
2983+
In general, `use` creates an local alias:
29842984
An alternate path and a possibly different name to access the same item,
29852985
without touching the original, and with both being interchangeable.
29862986

branches/try/src/etc/zsh/_rust

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ _rustc_opts_lint=(
6868
'unsafe-block[usage of an `unsafe` block]'
6969
'unstable[detects use of #\[unstable\] items (incl. items with no stability attribute)]'
7070
'unused-imports[imports that are never used]'
71-
'unused-must-use[unused result of a type flagged as #\[must_use\]]'
71+
'unused-must-use[unused result of an type flagged as #\[must_use\]]'
7272
"unused-mut[detect mut variables which don't need to be mutable]"
7373
'unused-result[unused result of an expression in a statement]'
7474
'unused-unsafe[unnecessary use of an `unsafe` block]'

branches/try/src/libcollections/hashmap.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ mod table {
278278
/// the appropriate types to pass on to most of the other functions in
279279
/// this module.
280280
pub fn peek(&self, index: uint) -> BucketState {
281-
debug_assert!(index < self.capacity);
281+
// FIXME #12049
282+
if cfg!(test) { assert!(index < self.capacity) }
282283

283284
let idx = index as int;
284285
let hash = unsafe { *self.hashes.offset(idx) };
@@ -305,7 +306,8 @@ mod table {
305306
let idx = index.idx;
306307

307308
unsafe {
308-
debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET);
309+
// FIXME #12049
310+
if cfg!(test) { assert!(*self.hashes.offset(idx) != EMPTY_BUCKET) }
309311
(&'a *self.keys.offset(idx),
310312
&'a *self.vals.offset(idx))
311313
}
@@ -317,7 +319,8 @@ mod table {
317319
let idx = index.idx;
318320

319321
unsafe {
320-
debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET);
322+
// FIXME #12049
323+
if cfg!(test) { assert!(*self.hashes.offset(idx) != EMPTY_BUCKET) }
321324
(&'a *self.keys.offset(idx),
322325
&'a mut *self.vals.offset(idx))
323326
}
@@ -329,7 +332,8 @@ mod table {
329332
let idx = index.idx;
330333

331334
unsafe {
332-
debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET);
335+
// FIXME #12049
336+
if cfg!(test) { assert!(*self.hashes.offset(idx) != EMPTY_BUCKET) }
333337
(transmute(self.hashes.offset(idx)),
334338
&'a mut *self.keys.offset(idx),
335339
&'a mut *self.vals.offset(idx))
@@ -347,7 +351,8 @@ mod table {
347351
let idx = index.idx;
348352

349353
unsafe {
350-
debug_assert_eq!(*self.hashes.offset(idx), EMPTY_BUCKET);
354+
// FIXME #12049
355+
if cfg!(test) { assert_eq!(*self.hashes.offset(idx), EMPTY_BUCKET) }
351356
*self.hashes.offset(idx) = hash.inspect();
352357
move_val_init(&mut *self.keys.offset(idx), k);
353358
move_val_init(&mut *self.vals.offset(idx), v);
@@ -366,7 +371,8 @@ mod table {
366371
let idx = index.idx;
367372

368373
unsafe {
369-
debug_assert!(*self.hashes.offset(idx) != EMPTY_BUCKET);
374+
// FIXME #12049
375+
if cfg!(test) { assert!(*self.hashes.offset(idx) != EMPTY_BUCKET) }
370376

371377
*self.hashes.offset(idx) = EMPTY_BUCKET;
372378

@@ -692,13 +698,13 @@ static INITIAL_LOAD_FACTOR: Fraction = (9, 10);
692698
/// book_reviews.insert("The Adventures of Sherlock Holmes", "Eye lyked it alot.");
693699
///
694700
/// // check for a specific one.
695-
/// if !book_reviews.contains_key(&("Les Misérables")) {
701+
/// if !book_reviews.contains_key(& &"Les Misérables") {
696702
/// println!("We've got {} reviews, but Les Misérables ain't one.",
697703
/// book_reviews.len());
698704
/// }
699705
///
700706
/// // oops, this review has a lot of spelling mistakes, let's delete it.
701-
/// book_reviews.remove(&("The Adventures of Sherlock Holmes"));
707+
/// book_reviews.remove(& &"The Adventures of Sherlock Holmes");
702708
///
703709
/// // look up the values associated with some keys.
704710
/// let to_find = ["Pride and Prejudice", "Alice's Adventure in Wonderland"];

branches/try/src/libcollections/treemap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,10 +1651,10 @@ mod test_set {
16511651

16521652
// FIXME: #5801: this needs a type hint to compile...
16531653
let result: Option<(&uint, & &'static str)> = z.next();
1654-
assert_eq!(result.unwrap(), (&5u, &("bar")));
1654+
assert_eq!(result.unwrap(), (&5u, & &"bar"));
16551655

16561656
let result: Option<(&uint, & &'static str)> = z.next();
1657-
assert_eq!(result.unwrap(), (&11u, &("foo")));
1657+
assert_eq!(result.unwrap(), (&11u, & &"foo"));
16581658

16591659
let result: Option<(&uint, & &'static str)> = z.next();
16601660
assert!(result.is_none());

branches/try/src/libgetopts/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ mod tests {
14411441
optmulti("l", "", "Desc", "VAL"));
14421442

14431443
let expected =
1444-
"Usage: fruits
1444+
~"Usage: fruits
14451445

14461446
Options:
14471447
-b --banana VAL Desc
@@ -1450,7 +1450,7 @@ Options:
14501450
-k --kiwi Desc
14511451
-p [VAL] Desc
14521452
-l VAL Desc
1453-
".to_owned();
1453+
";
14541454
14551455
let generated_usage = usage("Usage: fruits", optgroups.as_slice());
14561456

@@ -1471,13 +1471,13 @@ Options:
14711471
"This is a long description which _will_ be wrapped..+.."));
14721472

14731473
let expected =
1474-
"Usage: fruits
1474+
~"Usage: fruits
14751475

14761476
Options:
14771477
-k --kiwi This is a long description which won't be wrapped..+..
14781478
-a --apple This is a long description which _will_ be
14791479
wrapped..+..
1480-
".to_owned();
1480+
";
14811481
14821482
let usage = usage("Usage: fruits", optgroups.as_slice());
14831483

@@ -1496,14 +1496,14 @@ Options:
14961496
confuse the line wrapping; an apple costs 0.51€ in some parts of Europe."));
14971497

14981498
let expected =
1499-
"Usage: fruits
1499+
~"Usage: fruits
15001500

15011501
Options:
15021502
-k --k–w– The word kiwi is normally spelled with two i's
15031503
-a --apple This “description” has some characters that could
15041504
confuse the line wrapping; an apple costs 0.51in
15051505
some parts of Europe.
1506-
".to_owned();
1506+
";
15071507
15081508
let usage = usage("Usage: fruits", optgroups.as_slice());
15091509

branches/try/src/libnative/io/timer_win32.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl rtio::RtioTimer for Timer {
137137

138138
// there are 10^6 nanoseconds in a millisecond, and the parameter is in
139139
// 100ns intervals, so we multiply by 10^4.
140-
let due = -(msecs as i64 * 10000) as libc::LARGE_INTEGER;
140+
let due = -(msecs * 10000) as libc::LARGE_INTEGER;
141141
assert_eq!(unsafe {
142142
imp::SetWaitableTimer(self.obj, &due, 0, ptr::null(),
143143
ptr::mut_null(), 0)
@@ -151,7 +151,7 @@ impl rtio::RtioTimer for Timer {
151151
let (tx, rx) = channel();
152152

153153
// see above for the calculation
154-
let due = -(msecs as i64 * 10000) as libc::LARGE_INTEGER;
154+
let due = -(msecs * 10000) as libc::LARGE_INTEGER;
155155
assert_eq!(unsafe {
156156
imp::SetWaitableTimer(self.obj, &due, 0, ptr::null(),
157157
ptr::mut_null(), 0)
@@ -167,7 +167,7 @@ impl rtio::RtioTimer for Timer {
167167
let (tx, rx) = channel();
168168

169169
// see above for the calculation
170-
let due = -(msecs as i64 * 10000) as libc::LARGE_INTEGER;
170+
let due = -(msecs * 10000) as libc::LARGE_INTEGER;
171171
assert_eq!(unsafe {
172172
imp::SetWaitableTimer(self.obj, &due, msecs as libc::LONG,
173173
ptr::null(), ptr::mut_null(), 0)

0 commit comments

Comments
 (0)