Skip to content

Commit a3eecdd

Browse files
committed
---
yaml --- r: 235178 b: refs/heads/stable c: a2b927c h: refs/heads/master v: v3
1 parent f6df30b commit a3eecdd

File tree

15 files changed

+98
-38
lines changed

15 files changed

+98
-38
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: f5ea6208e040a9c59824f153c0c8bd11e5efd7c1
32+
refs/heads/stable: a2b927c5a41ded169a0919ff8193b5357c850217
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: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,16 +1126,10 @@ 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 {
11341129
let aux_dir = aux_output_dir_name(config, testfile);
11351130
// FIXME (#9639): This needs to handle non-utf8 paths
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());
1131+
let link_args = vec!("-L".to_string(),
1132+
aux_dir.to_str().unwrap().to_string());
11391133
let args = make_compile_args(config,
11401134
props,
11411135
link_args,
@@ -1144,7 +1138,7 @@ fn compile_test_(config: &Config, props: &TestProps,
11441138
}
11451139

11461140
fn document(config: &Config, props: &TestProps,
1147-
testfile: &Path, extra_args: &[String]) -> (ProcRes, PathBuf) {
1141+
testfile: &Path) -> (ProcRes, PathBuf) {
11481142
let aux_dir = aux_output_dir_name(config, testfile);
11491143
let out_dir = output_base_name(config, testfile);
11501144
let _ = fs::remove_dir_all(&out_dir);
@@ -1154,7 +1148,6 @@ fn document(config: &Config, props: &TestProps,
11541148
"-o".to_string(),
11551149
out_dir.to_str().unwrap().to_string(),
11561150
testfile.to_str().unwrap().to_string()];
1157-
args.extend(extra_args.iter().cloned());
11581151
args.extend(split_maybe_args(&props.compile_flags));
11591152
let args = ProcArgs {
11601153
prog: config.rustdoc_path.to_str().unwrap().to_string(),
@@ -1717,7 +1710,7 @@ fn charset() -> &'static str {
17171710
}
17181711

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

branches/stable/src/doc/reference.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3351,18 +3351,23 @@ 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-
An example of each kind:
3354+
Examples:
33553355

33563356
```{rust}
3357-
let vec: Vec<i32> = vec![1, 2, 3];
3358-
let arr: [i32; 3] = [1, 2, 3];
3359-
let s: &[i32] = &vec[..];
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[..];
33603365
```
33613366

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

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

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

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

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

35353541

35363542
### Trait objects

branches/stable/src/libcollections/vec.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ 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-
163160
////////////////////////////////////////////////////////////////////////////////
164161
// Inherent methods
165162
////////////////////////////////////////////////////////////////////////////////

branches/stable/src/libcollections/vec_deque.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub struct VecDeque<T> {
4747
// tail and head are pointers into the buffer. Tail always points
4848
// to the first element that could be read, Head always points
4949
// to where data should be written.
50-
// If tail == head the buffer is empty. The length of the ringbuf
50+
// If tail == head the buffer is empty. The length of the ringbuffer
5151
// is defined as the distance between the two.
5252

5353
tail: usize,
@@ -313,7 +313,7 @@ impl<T> VecDeque<T> {
313313
}
314314

315315
/// Reserves capacity for at least `additional` more elements to be inserted in the given
316-
/// `Ringbuf`. The collection may reserve more space to avoid frequent reallocations.
316+
/// `VecDeque`. The collection may reserve more space to avoid frequent reallocations.
317317
///
318318
/// # Panics
319319
///
@@ -389,10 +389,10 @@ impl<T> VecDeque<T> {
389389
}
390390
}
391391

392-
/// Shrinks the capacity of the ringbuf as much as possible.
392+
/// Shrinks the capacity of the `VecDeque` as much as possible.
393393
///
394394
/// It will drop down as close as possible to the length but the allocator may still inform the
395-
/// ringbuf that there is space for a few more elements.
395+
/// `VecDeque` that there is space for a few more elements.
396396
///
397397
/// # Examples
398398
///
@@ -408,7 +408,7 @@ impl<T> VecDeque<T> {
408408
/// ```
409409
pub fn shrink_to_fit(&mut self) {
410410
// +1 since the ringbuffer always leaves one space empty
411-
// len + 1 can't overflow for an existing, well-formed ringbuf.
411+
// len + 1 can't overflow for an existing, well-formed ringbuffer.
412412
let target_cap = cmp::max(self.len() + 1, MINIMUM_CAPACITY + 1).next_power_of_two();
413413
if target_cap < self.cap {
414414
// There are three cases of interest:
@@ -476,9 +476,9 @@ impl<T> VecDeque<T> {
476476
}
477477
}
478478

479-
/// Shortens a ringbuf, dropping excess elements from the back.
479+
/// Shortens a `VecDeque`, dropping excess elements from the back.
480480
///
481-
/// If `len` is greater than the ringbuf's current length, this has no
481+
/// If `len` is greater than the `VecDeque`'s current length, this has no
482482
/// effect.
483483
///
484484
/// # Examples
@@ -862,8 +862,8 @@ impl<T> VecDeque<T> {
862862
self.tail <= self.head
863863
}
864864

865-
/// Removes an element from anywhere in the ringbuf and returns it, replacing it with the last
866-
/// element.
865+
/// Removes an element from anywhere in the `VecDeque` and returns it, replacing it with the
866+
/// last element.
867867
///
868868
/// This does not preserve ordering, but is O(1).
869869
///
@@ -896,7 +896,7 @@ impl<T> VecDeque<T> {
896896
self.pop_back()
897897
}
898898

899-
/// Removes an element from anywhere in the ringbuf and returns it,
899+
/// Removes an element from anywhere in the `VecDeque` and returns it,
900900
/// replacing it with the first element.
901901
///
902902
/// This does not preserve ordering, but is O(1).
@@ -930,13 +930,13 @@ impl<T> VecDeque<T> {
930930
self.pop_front()
931931
}
932932

933-
/// Inserts an element at position `i` within the ringbuf. Whichever
933+
/// Inserts an element at position `i` within the `VecDeque`. Whichever
934934
/// end is closer to the insertion point will be moved to make room,
935935
/// and all the affected elements will be moved to new positions.
936936
///
937937
/// # Panics
938938
///
939-
/// Panics if `i` is greater than ringbuf's length
939+
/// Panics if `i` is greater than `VecDeque`'s length
940940
///
941941
/// # Examples
942942
/// ```
@@ -1136,7 +1136,7 @@ impl<T> VecDeque<T> {
11361136
}
11371137
}
11381138

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

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

branches/stable/src/libcore/mem.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,17 +445,22 @@ 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)]
448449
pub const POST_DROP_U8: u8 = 0x1d;
449450
#[unstable(feature = "filling_drop")]
451+
#[allow(missing_docs)]
450452
pub const POST_DROP_U32: u32 = repeat_u8_as_u32!(POST_DROP_U8);
451453
#[unstable(feature = "filling_drop")]
454+
#[allow(missing_docs)]
452455
pub const POST_DROP_U64: u64 = repeat_u8_as_u64!(POST_DROP_U8);
453456

454457
#[cfg(target_pointer_width = "32")]
455458
#[unstable(feature = "filling_drop")]
459+
#[allow(missing_docs)]
456460
pub const POST_DROP_USIZE: usize = POST_DROP_U32 as usize;
457461
#[cfg(target_pointer_width = "64")]
458462
#[unstable(feature = "filling_drop")]
463+
#[allow(missing_docs)]
459464
pub const POST_DROP_USIZE: usize = POST_DROP_U64 as usize;
460465

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

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

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

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

2930
#[stable(feature = "rust1", since = "1.0.0")]
31+
#[allow(missing_docs)]
3032
pub const MANTISSA_DIGITS: u32 = 24;
3133
#[stable(feature = "rust1", since = "1.0.0")]
34+
#[allow(missing_docs)]
3235
pub const DIGITS: u32 = 6;
3336

3437
#[stable(feature = "rust1", since = "1.0.0")]
38+
#[allow(missing_docs)]
3539
pub const EPSILON: f32 = 1.19209290e-07_f32;
3640

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

4751
#[stable(feature = "rust1", since = "1.0.0")]
52+
#[allow(missing_docs)]
4853
pub const MIN_EXP: i32 = -125;
4954
#[stable(feature = "rust1", since = "1.0.0")]
55+
#[allow(missing_docs)]
5056
pub const MAX_EXP: i32 = 128;
5157

5258
#[stable(feature = "rust1", since = "1.0.0")]
59+
#[allow(missing_docs)]
5360
pub const MIN_10_EXP: i32 = -37;
5461
#[stable(feature = "rust1", since = "1.0.0")]
62+
#[allow(missing_docs)]
5563
pub const MAX_10_EXP: i32 = 38;
5664

5765
#[stable(feature = "rust1", since = "1.0.0")]
66+
#[allow(missing_docs)]
5867
pub const NAN: f32 = 0.0_f32/0.0_f32;
5968
#[stable(feature = "rust1", since = "1.0.0")]
69+
#[allow(missing_docs)]
6070
pub const INFINITY: f32 = 1.0_f32/0.0_f32;
6171
#[stable(feature = "rust1", since = "1.0.0")]
72+
#[allow(missing_docs)]
6273
pub const NEG_INFINITY: f32 = -1.0_f32/0.0_f32;
6374

6475
/// Basic mathematial constants.

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

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

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

2930
#[stable(feature = "rust1", since = "1.0.0")]
31+
#[allow(missing_docs)]
3032
pub const MANTISSA_DIGITS: u32 = 53;
3133
#[stable(feature = "rust1", since = "1.0.0")]
34+
#[allow(missing_docs)]
3235
pub const DIGITS: u32 = 15;
3336

3437
#[stable(feature = "rust1", since = "1.0.0")]
38+
#[allow(missing_docs)]
3539
pub const EPSILON: f64 = 2.2204460492503131e-16_f64;
3640

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

4751
#[stable(feature = "rust1", since = "1.0.0")]
52+
#[allow(missing_docs)]
4853
pub const MIN_EXP: i32 = -1021;
4954
#[stable(feature = "rust1", since = "1.0.0")]
55+
#[allow(missing_docs)]
5056
pub const MAX_EXP: i32 = 1024;
5157

5258
#[stable(feature = "rust1", since = "1.0.0")]
59+
#[allow(missing_docs)]
5360
pub const MIN_10_EXP: i32 = -307;
5461
#[stable(feature = "rust1", since = "1.0.0")]
62+
#[allow(missing_docs)]
5563
pub const MAX_10_EXP: i32 = 308;
5664

5765
#[stable(feature = "rust1", since = "1.0.0")]
66+
#[allow(missing_docs)]
5867
pub const NAN: f64 = 0.0_f64/0.0_f64;
5968
#[stable(feature = "rust1", since = "1.0.0")]
69+
#[allow(missing_docs)]
6070
pub const INFINITY: f64 = 1.0_f64/0.0_f64;
6171
#[stable(feature = "rust1", since = "1.0.0")]
72+
#[allow(missing_docs)]
6273
pub const NEG_INFINITY: f64 = -1.0_f64/0.0_f64;
6374

6475
/// Basic mathematial constants.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,25 @@ 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)]
1920
pub const BITS : usize = $bits;
2021
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
2122
// calling the `mem::size_of` function.
2223
#[unstable(feature = "num_bits_bytes",
2324
reason = "may want to be an associated function")]
25+
#[allow(missing_docs)]
2426
pub const BYTES : usize = ($bits / 8);
2527

2628
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
2729
// calling the `Bounded::min_value` function.
2830
#[stable(feature = "rust1", since = "1.0.0")]
31+
#[allow(missing_docs)]
2932
pub const MIN: $T = (-1 as $T) << (BITS - 1);
3033
// FIXME(#9837): Compute MIN like this so the high bits that shouldn't exist are 0.
3134
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
3235
// calling the `Bounded::max_value` function.
3336
#[stable(feature = "rust1", since = "1.0.0")]
37+
#[allow(missing_docs)]
3438
pub const MAX: $T = !MIN;
3539

3640
) }

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ 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)]
1718
pub const BITS : usize = $bits;
1819
#[unstable(feature = "num_bits_bytes",
1920
reason = "may want to be an associated function")]
21+
#[allow(missing_docs)]
2022
pub const BYTES : usize = ($bits / 8);
2123

2224
#[stable(feature = "rust1", since = "1.0.0")]
25+
#[allow(missing_docs)]
2326
pub const MIN: $T = 0 as $T;
2427
#[stable(feature = "rust1", since = "1.0.0")]
28+
#[allow(missing_docs)]
2529
pub const MAX: $T = !0 as $T;
2630

2731
) }

branches/stable/src/librustc_lint/builtin.rs

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

branches/stable/src/libterm/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ pub fn stderr() -> Option<Box<Terminal<WriterWrapper> + Send>> {
152152

153153

154154
/// Terminal color definitions
155+
#[allow(missing_docs)]
155156
pub mod color {
156157
/// Number for a terminal color
157158
pub type Color = u16;

0 commit comments

Comments
 (0)