Skip to content

Commit f6df30b

Browse files
committed
---
yaml --- r: 235177 b: refs/heads/stable c: f5ea620 h: refs/heads/master i: 235175: 1afc51c v: v3
1 parent ced2aa6 commit f6df30b

File tree

15 files changed

+42
-98
lines changed

15 files changed

+42
-98
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: d0fdfbfb0d34f196f52b9d15215723c4785c4afa
32+
refs/heads/stable: f5ea6208e040a9c59824f153c0c8bd11e5efd7c1
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/compiletest/runtest.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,10 +1126,16 @@ impl fmt::Display for Status {
11261126

11271127
fn compile_test(config: &Config, props: &TestProps,
11281128
testfile: &Path) -> ProcRes {
1129+
compile_test_(config, props, testfile, &[])
1130+
}
1131+
1132+
fn compile_test_(config: &Config, props: &TestProps,
1133+
testfile: &Path, extra_args: &[String]) -> ProcRes {
11291134
let aux_dir = aux_output_dir_name(config, testfile);
11301135
// FIXME (#9639): This needs to handle non-utf8 paths
1131-
let link_args = vec!("-L".to_string(),
1132-
aux_dir.to_str().unwrap().to_string());
1136+
let mut link_args = vec!("-L".to_string(),
1137+
aux_dir.to_str().unwrap().to_string());
1138+
link_args.extend(extra_args.iter().cloned());
11331139
let args = make_compile_args(config,
11341140
props,
11351141
link_args,
@@ -1138,7 +1144,7 @@ fn compile_test(config: &Config, props: &TestProps,
11381144
}
11391145

11401146
fn document(config: &Config, props: &TestProps,
1141-
testfile: &Path) -> (ProcRes, PathBuf) {
1147+
testfile: &Path, extra_args: &[String]) -> (ProcRes, PathBuf) {
11421148
let aux_dir = aux_output_dir_name(config, testfile);
11431149
let out_dir = output_base_name(config, testfile);
11441150
let _ = fs::remove_dir_all(&out_dir);
@@ -1148,6 +1154,7 @@ fn document(config: &Config, props: &TestProps,
11481154
"-o".to_string(),
11491155
out_dir.to_str().unwrap().to_string(),
11501156
testfile.to_str().unwrap().to_string()];
1157+
args.extend(extra_args.iter().cloned());
11511158
args.extend(split_maybe_args(&props.compile_flags));
11521159
let args = ProcArgs {
11531160
prog: config.rustdoc_path.to_str().unwrap().to_string(),
@@ -1710,7 +1717,7 @@ fn charset() -> &'static str {
17101717
}
17111718

17121719
fn run_rustdoc_test(config: &Config, props: &TestProps, testfile: &Path) {
1713-
let (proc_res, out_dir) = document(config, props, testfile);
1720+
let (proc_res, out_dir) = document(config, props, testfile, &[]);
17141721
if !proc_res.status.success() {
17151722
fatal_proc_rec("rustdoc failed!", &proc_res);
17161723
}

branches/stable/src/doc/reference.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3351,23 +3351,18 @@ heap.
33513351
A slice is a 'view' into an array. It doesn't own the data it points
33523352
to, it borrows it.
33533353

3354-
Examples:
3354+
An example of each kind:
33553355

33563356
```{rust}
3357-
// A stack-allocated array
3358-
let array: [i32; 3] = [1, 2, 3];
3359-
3360-
// A heap-allocated array
3361-
let vector: Vec<i32> = vec![1, 2, 3];
3362-
3363-
// A slice into an array
3364-
let slice: &[i32] = &vector[..];
3357+
let vec: Vec<i32> = vec![1, 2, 3];
3358+
let arr: [i32; 3] = [1, 2, 3];
3359+
let s: &[i32] = &vec[..];
33653360
```
33663361

33673362
As you can see, the `vec!` macro allows you to create a `Vec<T>` easily. The
33683363
`vec!` macro is also part of the standard library, rather than the language.
33693364

3370-
All in-bounds elements of arrays and slices are always initialized, and access
3365+
All in-bounds elements of arrays, and slices are always initialized, and access
33713366
to an array or slice is always bounds-checked.
33723367

33733368
### Structure types
@@ -3529,14 +3524,13 @@ more of the closure traits:
35293524

35303525
* `FnMut`
35313526
: The closure can be called multiple times as mutable. A closure called as
3532-
`FnMut` can mutate values from its environment. `FnMut` inherits from
3533-
`FnOnce` (i.e. anything implementing `FnMut` also implements `FnOnce`).
3527+
`FnMut` can mutate values from its environment. `FnMut` implies
3528+
`FnOnce`.
35343529

35353530
* `Fn`
35363531
: The closure can be called multiple times through a shared reference.
35373532
A closure called as `Fn` can neither move out from nor mutate values
3538-
from its environment. `Fn` inherits from `FnMut`, which itself
3539-
inherits from `FnOnce`.
3533+
from its environment. `Fn` implies `FnMut` and `FnOnce`.
35403534

35413535

35423536
### Trait objects

branches/stable/src/libcollections/vec.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ pub struct Vec<T> {
157157
cap: usize,
158158
}
159159

160+
unsafe impl<T: Send> Send for Vec<T> { }
161+
unsafe impl<T: Sync> Sync for Vec<T> { }
162+
160163
////////////////////////////////////////////////////////////////////////////////
161164
// Inherent methods
162165
////////////////////////////////////////////////////////////////////////////////

branches/stable/src/libcollections/vec_deque.rs

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ const MINIMUM_CAPACITY: usize = 1; // 2 - 1
3838

3939
/// `VecDeque` is a growable ring buffer, which can be used as a
4040
/// double-ended queue efficiently.
41+
///
42+
/// The "default" usage of this type as a queue is to use `push_back` to add to the queue, and
43+
/// `pop_front` to remove from the queue. `extend` and `append` push onto the back in this manner,
44+
/// and iterating over `VecDeque` goes front to back.
4145
#[stable(feature = "rust1", since = "1.0.0")]
4246
pub struct VecDeque<T> {
4347
// tail and head are pointers into the buffer. Tail always points
4448
// to the first element that could be read, Head always points
4549
// to where data should be written.
46-
// If tail == head the buffer is empty. The length of the ringbuffer
50+
// If tail == head the buffer is empty. The length of the ringbuf
4751
// is defined as the distance between the two.
4852

4953
tail: usize,
@@ -309,7 +313,7 @@ impl<T> VecDeque<T> {
309313
}
310314

311315
/// Reserves capacity for at least `additional` more elements to be inserted in the given
312-
/// `VecDeque`. The collection may reserve more space to avoid frequent reallocations.
316+
/// `Ringbuf`. The collection may reserve more space to avoid frequent reallocations.
313317
///
314318
/// # Panics
315319
///
@@ -385,10 +389,10 @@ impl<T> VecDeque<T> {
385389
}
386390
}
387391

388-
/// Shrinks the capacity of the `VecDeque` as much as possible.
392+
/// Shrinks the capacity of the ringbuf as much as possible.
389393
///
390394
/// It will drop down as close as possible to the length but the allocator may still inform the
391-
/// `VecDeque` that there is space for a few more elements.
395+
/// ringbuf that there is space for a few more elements.
392396
///
393397
/// # Examples
394398
///
@@ -404,7 +408,7 @@ impl<T> VecDeque<T> {
404408
/// ```
405409
pub fn shrink_to_fit(&mut self) {
406410
// +1 since the ringbuffer always leaves one space empty
407-
// len + 1 can't overflow for an existing, well-formed ringbuffer.
411+
// len + 1 can't overflow for an existing, well-formed ringbuf.
408412
let target_cap = cmp::max(self.len() + 1, MINIMUM_CAPACITY + 1).next_power_of_two();
409413
if target_cap < self.cap {
410414
// There are three cases of interest:
@@ -472,9 +476,9 @@ impl<T> VecDeque<T> {
472476
}
473477
}
474478

475-
/// Shortens a `VecDeque`, dropping excess elements from the back.
479+
/// Shortens a ringbuf, dropping excess elements from the back.
476480
///
477-
/// If `len` is greater than the `VecDeque`'s current length, this has no
481+
/// If `len` is greater than the ringbuf's current length, this has no
478482
/// effect.
479483
///
480484
/// # Examples
@@ -858,8 +862,8 @@ impl<T> VecDeque<T> {
858862
self.tail <= self.head
859863
}
860864

861-
/// Removes an element from anywhere in the `VecDeque` and returns it, replacing it with the
862-
/// last element.
865+
/// Removes an element from anywhere in the ringbuf and returns it, replacing it with the last
866+
/// element.
863867
///
864868
/// This does not preserve ordering, but is O(1).
865869
///
@@ -892,7 +896,7 @@ impl<T> VecDeque<T> {
892896
self.pop_back()
893897
}
894898

895-
/// Removes an element from anywhere in the `VecDeque` and returns it,
899+
/// Removes an element from anywhere in the ringbuf and returns it,
896900
/// replacing it with the first element.
897901
///
898902
/// This does not preserve ordering, but is O(1).
@@ -926,13 +930,13 @@ impl<T> VecDeque<T> {
926930
self.pop_front()
927931
}
928932

929-
/// Inserts an element at position `i` within the `VecDeque`. Whichever
933+
/// Inserts an element at position `i` within the ringbuf. Whichever
930934
/// end is closer to the insertion point will be moved to make room,
931935
/// and all the affected elements will be moved to new positions.
932936
///
933937
/// # Panics
934938
///
935-
/// Panics if `i` is greater than `VecDeque`'s length
939+
/// Panics if `i` is greater than ringbuf's length
936940
///
937941
/// # Examples
938942
/// ```
@@ -1132,7 +1136,7 @@ impl<T> VecDeque<T> {
11321136
}
11331137
}
11341138

1135-
/// Removes and returns the element at position `i` from the `VecDeque`.
1139+
/// Removes and returns the element at position `i` from the ringbuf.
11361140
/// Whichever end is closer to the removal point will be moved to make
11371141
/// room, and all the affected elements will be moved to new positions.
11381142
/// Returns `None` if `i` is out of bounds.
@@ -1428,7 +1432,7 @@ impl<T> VecDeque<T> {
14281432
}
14291433

14301434
impl<T: Clone> VecDeque<T> {
1431-
/// Modifies the `VecDeque` in-place so that `len()` is equal to new_len,
1435+
/// Modifies the ringbuf in-place so that `len()` is equal to new_len,
14321436
/// either by removing excess elements or by appending copies of a value to the back.
14331437
///
14341438
/// # Examples

branches/stable/src/libcore/mem.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -445,22 +445,17 @@ macro_rules! repeat_u8_as_u64 {
445445
//
446446
// And of course, 0x00 brings back the old world of zero'ing on drop.
447447
#[unstable(feature = "filling_drop")]
448-
#[allow(missing_docs)]
449448
pub const POST_DROP_U8: u8 = 0x1d;
450449
#[unstable(feature = "filling_drop")]
451-
#[allow(missing_docs)]
452450
pub const POST_DROP_U32: u32 = repeat_u8_as_u32!(POST_DROP_U8);
453451
#[unstable(feature = "filling_drop")]
454-
#[allow(missing_docs)]
455452
pub const POST_DROP_U64: u64 = repeat_u8_as_u64!(POST_DROP_U8);
456453

457454
#[cfg(target_pointer_width = "32")]
458455
#[unstable(feature = "filling_drop")]
459-
#[allow(missing_docs)]
460456
pub const POST_DROP_USIZE: usize = POST_DROP_U32 as usize;
461457
#[cfg(target_pointer_width = "64")]
462458
#[unstable(feature = "filling_drop")]
463-
#[allow(missing_docs)]
464459
pub const POST_DROP_USIZE: usize = POST_DROP_U64 as usize;
465460

466461
/// Interprets `src` as `&U`, and then reads `src` without moving the contained

branches/stable/src/libcore/num/f32.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,14 @@ use num::{Float, ParseFloatError};
2424
use num::FpCategory as Fp;
2525

2626
#[stable(feature = "rust1", since = "1.0.0")]
27-
#[allow(missing_docs)]
2827
pub const RADIX: u32 = 2;
2928

3029
#[stable(feature = "rust1", since = "1.0.0")]
31-
#[allow(missing_docs)]
3230
pub const MANTISSA_DIGITS: u32 = 24;
3331
#[stable(feature = "rust1", since = "1.0.0")]
34-
#[allow(missing_docs)]
3532
pub const DIGITS: u32 = 6;
3633

3734
#[stable(feature = "rust1", since = "1.0.0")]
38-
#[allow(missing_docs)]
3935
pub const EPSILON: f32 = 1.19209290e-07_f32;
4036

4137
/// Smallest finite f32 value
@@ -49,27 +45,20 @@ pub const MIN_POSITIVE: f32 = 1.17549435e-38_f32;
4945
pub const MAX: f32 = 3.40282347e+38_f32;
5046

5147
#[stable(feature = "rust1", since = "1.0.0")]
52-
#[allow(missing_docs)]
5348
pub const MIN_EXP: i32 = -125;
5449
#[stable(feature = "rust1", since = "1.0.0")]
55-
#[allow(missing_docs)]
5650
pub const MAX_EXP: i32 = 128;
5751

5852
#[stable(feature = "rust1", since = "1.0.0")]
59-
#[allow(missing_docs)]
6053
pub const MIN_10_EXP: i32 = -37;
6154
#[stable(feature = "rust1", since = "1.0.0")]
62-
#[allow(missing_docs)]
6355
pub const MAX_10_EXP: i32 = 38;
6456

6557
#[stable(feature = "rust1", since = "1.0.0")]
66-
#[allow(missing_docs)]
6758
pub const NAN: f32 = 0.0_f32/0.0_f32;
6859
#[stable(feature = "rust1", since = "1.0.0")]
69-
#[allow(missing_docs)]
7060
pub const INFINITY: f32 = 1.0_f32/0.0_f32;
7161
#[stable(feature = "rust1", since = "1.0.0")]
72-
#[allow(missing_docs)]
7362
pub const NEG_INFINITY: f32 = -1.0_f32/0.0_f32;
7463

7564
/// Basic mathematial constants.

branches/stable/src/libcore/num/f64.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,14 @@ use num::FpCategory as Fp;
2424
use num::{Float, ParseFloatError};
2525

2626
#[stable(feature = "rust1", since = "1.0.0")]
27-
#[allow(missing_docs)]
2827
pub const RADIX: u32 = 2;
2928

3029
#[stable(feature = "rust1", since = "1.0.0")]
31-
#[allow(missing_docs)]
3230
pub const MANTISSA_DIGITS: u32 = 53;
3331
#[stable(feature = "rust1", since = "1.0.0")]
34-
#[allow(missing_docs)]
3532
pub const DIGITS: u32 = 15;
3633

3734
#[stable(feature = "rust1", since = "1.0.0")]
38-
#[allow(missing_docs)]
3935
pub const EPSILON: f64 = 2.2204460492503131e-16_f64;
4036

4137
/// Smallest finite f64 value
@@ -49,27 +45,20 @@ pub const MIN_POSITIVE: f64 = 2.2250738585072014e-308_f64;
4945
pub const MAX: f64 = 1.7976931348623157e+308_f64;
5046

5147
#[stable(feature = "rust1", since = "1.0.0")]
52-
#[allow(missing_docs)]
5348
pub const MIN_EXP: i32 = -1021;
5449
#[stable(feature = "rust1", since = "1.0.0")]
55-
#[allow(missing_docs)]
5650
pub const MAX_EXP: i32 = 1024;
5751

5852
#[stable(feature = "rust1", since = "1.0.0")]
59-
#[allow(missing_docs)]
6053
pub const MIN_10_EXP: i32 = -307;
6154
#[stable(feature = "rust1", since = "1.0.0")]
62-
#[allow(missing_docs)]
6355
pub const MAX_10_EXP: i32 = 308;
6456

6557
#[stable(feature = "rust1", since = "1.0.0")]
66-
#[allow(missing_docs)]
6758
pub const NAN: f64 = 0.0_f64/0.0_f64;
6859
#[stable(feature = "rust1", since = "1.0.0")]
69-
#[allow(missing_docs)]
7060
pub const INFINITY: f64 = 1.0_f64/0.0_f64;
7161
#[stable(feature = "rust1", since = "1.0.0")]
72-
#[allow(missing_docs)]
7362
pub const NEG_INFINITY: f64 = -1.0_f64/0.0_f64;
7463

7564
/// Basic mathematial constants.

branches/stable/src/libcore/num/int_macros.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,21 @@ macro_rules! int_module { ($T:ty, $bits:expr) => (
1616
// calling the `mem::size_of` function.
1717
#[unstable(feature = "num_bits_bytes",
1818
reason = "may want to be an associated function")]
19-
#[allow(missing_docs)]
2019
pub const BITS : usize = $bits;
2120
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
2221
// calling the `mem::size_of` function.
2322
#[unstable(feature = "num_bits_bytes",
2423
reason = "may want to be an associated function")]
25-
#[allow(missing_docs)]
2624
pub const BYTES : usize = ($bits / 8);
2725

2826
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
2927
// calling the `Bounded::min_value` function.
3028
#[stable(feature = "rust1", since = "1.0.0")]
31-
#[allow(missing_docs)]
3229
pub const MIN: $T = (-1 as $T) << (BITS - 1);
3330
// FIXME(#9837): Compute MIN like this so the high bits that shouldn't exist are 0.
3431
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
3532
// calling the `Bounded::max_value` function.
3633
#[stable(feature = "rust1", since = "1.0.0")]
37-
#[allow(missing_docs)]
3834
pub const MAX: $T = !MIN;
3935

4036
) }

branches/stable/src/libcore/num/uint_macros.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,14 @@ macro_rules! uint_module { ($T:ty, $T_SIGNED:ty, $bits:expr) => (
1414

1515
#[unstable(feature = "num_bits_bytes",
1616
reason = "may want to be an associated function")]
17-
#[allow(missing_docs)]
1817
pub const BITS : usize = $bits;
1918
#[unstable(feature = "num_bits_bytes",
2019
reason = "may want to be an associated function")]
21-
#[allow(missing_docs)]
2220
pub const BYTES : usize = ($bits / 8);
2321

2422
#[stable(feature = "rust1", since = "1.0.0")]
25-
#[allow(missing_docs)]
2623
pub const MIN: $T = 0 as $T;
2724
#[stable(feature = "rust1", since = "1.0.0")]
28-
#[allow(missing_docs)]
2925
pub const MAX: $T = !0 as $T;
3026

3127
) }

branches/stable/src/librustc_lint/builtin.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,8 +1610,6 @@ impl LintPass for MissingDoc {
16101610
}
16111611
return
16121612
},
1613-
ast::ItemConst(..) => "a constant",
1614-
ast::ItemStatic(..) => "a static",
16151613
_ => return
16161614
};
16171615

0 commit comments

Comments
 (0)