Skip to content

Commit ea11138

Browse files
committed
---
yaml --- r: 190427 b: refs/heads/snap-stage3 c: b83b26b h: refs/heads/master i: 190425: 25ae3c6 190423: 1fc1719 v: v3
1 parent fbe04e1 commit ea11138

File tree

55 files changed

+178
-169
lines changed

Some content is hidden

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

55 files changed

+178
-169
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: 857ac28867722111249b5c3ef68e32499bd11ea0
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 7981aa6ac9165b0bb1a5f624b8802192b8ebc9ee
4+
refs/heads/snap-stage3: b83b26bacb6371173cdec6bf68c7ffa69f858c84
55
refs/heads/try: 1c28ab65017d74fc13d003f7c7a73d1a48e5406f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ The Rust community congregates in a few places:
115115

116116
## Contributing
117117

118-
To contribute to Rust, please see [CONTRIBUTING.md](CONTRIBUTING.md).
118+
To contribute to Rust, please see [CONTRIBUTING](CONTRIBUTING.md).
119119

120120
Rust has an [IRC] culture and most real-time collaboration happens in a
121121
variety of channels on Mozilla's IRC network, irc.mozilla.org. The
@@ -131,4 +131,4 @@ Rust is primarily distributed under the terms of both the MIT license
131131
and the Apache License (Version 2.0), with portions covered by various
132132
BSD-like licenses.
133133
134-
See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.
134+
See [LICENSE-APACHE](LICENSE-APACHE), [LICENSE-MIT](LICENSE-MIT), and [COPYRIGHT](COPYRIGHT) for details.

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ pub fn make_test<F>(config: &Config, testfile: &Path, f: F) -> test::TestDescAnd
332332
desc: test::TestDesc {
333333
name: make_test_name(config, testfile),
334334
ignore: header::is_test_ignored(config, testfile),
335-
should_fail: test::ShouldFail::No,
335+
should_panic: test::ShouldPanic::No,
336336
},
337337
testfn: f(),
338338
}

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,11 @@ safe concurrent programs.
389389
Here's an example of a concurrent Rust program:
390390
391391
```{rust}
392-
use std::thread::Thread;
392+
use std::thread;
393393
394394
fn main() {
395395
let guards: Vec<_> = (0..10).map(|_| {
396-
Thread::scoped(|| {
396+
thread::scoped(|| {
397397
println!("Hello, world!");
398398
})
399399
}).collect();
@@ -421,16 +421,16 @@ problem.
421421
Let's see an example. This Rust code will not compile:
422422
423423
```{rust,ignore}
424-
use std::thread::Thread;
424+
use std::thread;
425425
426426
fn main() {
427427
let mut numbers = vec![1, 2, 3];
428428
429429
let guards: Vec<_> = (0..3).map(|i| {
430-
Thread::scoped(move || {
430+
thread::scoped(move || {
431431
numbers[i] += 1;
432432
println!("numbers[{}] is {}", i, numbers[i]);
433-
});
433+
})
434434
}).collect();
435435
}
436436
```
@@ -439,10 +439,10 @@ It gives us this error:
439439
440440
```text
441441
7:25: 10:6 error: cannot move out of captured outer variable in an `FnMut` closure
442-
7 Thread::scoped(move || {
442+
7 thread::scoped(move || {
443443
8 numbers[i] += 1;
444444
9 println!("numbers[{}] is {}", i, numbers[i]);
445-
10 });
445+
10 })
446446
error: aborting due to previous error
447447
```
448448
@@ -471,19 +471,19 @@ mutation doesn't cause a data race.
471471
Here's what using an Arc with a Mutex looks like:
472472
473473
```{rust}
474-
use std::thread::Thread;
474+
use std::thread;
475475
use std::sync::{Arc,Mutex};
476476
477477
fn main() {
478478
let numbers = Arc::new(Mutex::new(vec![1, 2, 3]));
479479
480480
let guards: Vec<_> = (0..3).map(|i| {
481481
let number = numbers.clone();
482-
Thread::scoped(move || {
482+
thread::scoped(move || {
483483
let mut array = number.lock().unwrap();
484484
array[i] += 1;
485485
println!("numbers[{}] is {}", i, array[i]);
486-
});
486+
})
487487
}).collect();
488488
}
489489
```
@@ -535,15 +535,15 @@ As an example, Rust's ownership system is _entirely_ at compile time. The
535535
safety check that makes this an error about moved values:
536536
537537
```{rust,ignore}
538-
use std::thread::Thread;
538+
use std::thread;
539539
540540
fn main() {
541541
let numbers = vec![1, 2, 3];
542542
543543
let guards: Vec<_> = (0..3).map(|i| {
544-
Thread::scoped(move || {
544+
thread::scoped(move || {
545545
println!("{}", numbers[i]);
546-
});
546+
})
547547
}).collect();
548548
}
549549
```

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3007,10 +3007,6 @@ A type cast expression is denoted with the binary operator `as`.
30073007
Executing an `as` expression casts the value on the left-hand side to the type
30083008
on the right-hand side.
30093009

3010-
A numeric value can be cast to any numeric type. A raw pointer value can be
3011-
cast to or from any integral type or raw pointer type. Any other cast is
3012-
unsupported and will fail to compile.
3013-
30143010
An example of an `as` expression:
30153011

30163012
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ fn test_arena_destructors() {
323323
}
324324

325325
#[test]
326-
#[should_fail]
326+
#[should_panic]
327327
fn test_arena_destructors_fail() {
328328
let arena = Arena::new();
329329
// Put some stuff in the arena.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ mod test {
490490
}
491491

492492
#[test]
493-
#[should_fail]
493+
#[should_panic]
494494
fn test_overflow() {
495495
#[allow(dead_code)]
496496
#[derive(Copy)]

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,14 +1647,14 @@ mod tests {
16471647
}
16481648

16491649
#[test]
1650-
#[should_fail]
1650+
#[should_panic]
16511651
fn test_tail_empty() {
16521652
let a = Vec::<i32>::new();
16531653
a.tail();
16541654
}
16551655

16561656
#[test]
1657-
#[should_fail]
1657+
#[should_panic]
16581658
fn test_tail_mut_empty() {
16591659
let mut a = Vec::<i32>::new();
16601660
a.tail_mut();
@@ -1681,14 +1681,14 @@ mod tests {
16811681
}
16821682

16831683
#[test]
1684-
#[should_fail]
1684+
#[should_panic]
16851685
fn test_init_empty() {
16861686
let a = Vec::<i32>::new();
16871687
a.init();
16881688
}
16891689

16901690
#[test]
1691-
#[should_fail]
1691+
#[should_panic]
16921692
fn test_init_mut_empty() {
16931693
let mut a = Vec::<i32>::new();
16941694
a.init_mut();
@@ -1790,7 +1790,7 @@ mod tests {
17901790
}
17911791

17921792
#[test]
1793-
#[should_fail]
1793+
#[should_panic]
17941794
fn test_swap_remove_fail() {
17951795
let mut v = vec![1];
17961796
let _ = v.swap_remove(0);
@@ -2205,7 +2205,7 @@ mod tests {
22052205
}
22062206

22072207
#[test]
2208-
#[should_fail]
2208+
#[should_panic]
22092209
fn test_insert_oob() {
22102210
let mut a = vec![1, 2, 3];
22112211
a.insert(4, 5);
@@ -2229,7 +2229,7 @@ mod tests {
22292229
}
22302230

22312231
#[test]
2232-
#[should_fail]
2232+
#[should_panic]
22332233
fn test_remove_fail() {
22342234
let mut a = vec![1];
22352235
let _ = a.remove(0);
@@ -2253,7 +2253,7 @@ mod tests {
22532253
}
22542254

22552255
#[test]
2256-
#[should_fail]
2256+
#[should_panic]
22572257
fn test_permute_fail() {
22582258
let v: [(Box<_>, Rc<_>); 4] =
22592259
[(box 0, Rc::new(0)), (box 0, Rc::new(0)),
@@ -2528,7 +2528,7 @@ mod tests {
25282528
}
25292529

25302530
#[test]
2531-
#[should_fail]
2531+
#[should_panic]
25322532
fn test_windowsator_0() {
25332533
let v = &[1,2,3,4];
25342534
let _it = v.windows(0);
@@ -2564,7 +2564,7 @@ mod tests {
25642564
}
25652565

25662566
#[test]
2567-
#[should_fail]
2567+
#[should_panic]
25682568
fn test_chunksator_0() {
25692569
let v = &[1,2,3,4];
25702570
let _it = v.chunks(0);
@@ -2647,7 +2647,7 @@ mod tests {
26472647
}
26482648

26492649
#[test]
2650-
#[should_fail]
2650+
#[should_panic]
26512651
fn test_overflow_does_not_cause_segfault() {
26522652
let mut v = vec![];
26532653
v.reserve_exact(-1);
@@ -2656,7 +2656,7 @@ mod tests {
26562656
}
26572657

26582658
#[test]
2659-
#[should_fail]
2659+
#[should_panic]
26602660
fn test_overflow_does_not_cause_segfault_managed() {
26612661
let mut v = vec![Rc::new(1)];
26622662
v.reserve_exact(-1);
@@ -2833,7 +2833,7 @@ mod tests {
28332833
}
28342834

28352835
#[test]
2836-
#[should_fail]
2836+
#[should_panic]
28372837
fn test_mut_chunks_0() {
28382838
let mut v = [1, 2, 3, 4];
28392839
let _it = v.chunks_mut(0);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@ mod tests {
18771877
}
18781878

18791879
#[test]
1880-
#[should_fail]
1880+
#[should_panic]
18811881
fn test_slice_fail() {
18821882
"中华Việt Nam".slice(0, 2);
18831883
}
@@ -2095,7 +2095,7 @@ mod tests {
20952095
}
20962096

20972097
#[test]
2098-
#[should_fail]
2098+
#[should_panic]
20992099
fn test_as_bytes_fail() {
21002100
// Don't double free. (I'm not sure if this exercises the
21012101
// original problem code path anymore.)
@@ -2132,7 +2132,7 @@ mod tests {
21322132
}
21332133

21342134
#[test]
2135-
#[should_fail]
2135+
#[should_panic]
21362136
fn test_subslice_offset_2() {
21372137
let a = "alchemiter";
21382138
let b = "cruxtruder";

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,14 +1232,14 @@ mod tests {
12321232
}
12331233

12341234
#[test]
1235-
#[should_fail]
1235+
#[should_panic]
12361236
fn test_str_truncate_invalid_len() {
12371237
let mut s = String::from_str("12345");
12381238
s.truncate(6);
12391239
}
12401240

12411241
#[test]
1242-
#[should_fail]
1242+
#[should_panic]
12431243
fn test_str_truncate_split_codepoint() {
12441244
let mut s = String::from_str("\u{FC}"); // ü
12451245
s.truncate(1);
@@ -1272,7 +1272,7 @@ mod tests {
12721272
assert_eq!(s, "ไทย中华Vit Nam; foobar");
12731273
}
12741274

1275-
#[test] #[should_fail]
1275+
#[test] #[should_panic]
12761276
fn remove_bad() {
12771277
"ศ".to_string().remove(1);
12781278
}
@@ -1286,8 +1286,8 @@ mod tests {
12861286
assert_eq!(s, "ệfooยbar");
12871287
}
12881288

1289-
#[test] #[should_fail] fn insert_bad1() { "".to_string().insert(1, 't'); }
1290-
#[test] #[should_fail] fn insert_bad2() { "ệ".to_string().insert(1, 't'); }
1289+
#[test] #[should_panic] fn insert_bad1() { "".to_string().insert(1, 't'); }
1290+
#[test] #[should_panic] fn insert_bad2() { "ệ".to_string().insert(1, 't'); }
12911291

12921292
#[test]
12931293
fn test_slicing() {

0 commit comments

Comments
 (0)