Skip to content

Commit c01353b

Browse files
committed
---
yaml --- r: 235172 b: refs/heads/stable c: 8e2ce46 h: refs/heads/master v: v3
1 parent 6f73a01 commit c01353b

File tree

15 files changed

+35
-94
lines changed

15 files changed

+35
-94
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: 4c7c7b7477176878001881e88c12e003a51a3f34
32+
refs/heads/stable: 8e2ce46d990e8c84cd375662f43e740394e9ab40
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: 5 additions & 10 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

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: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub struct VecDeque<T> {
4343
// tail and head are pointers into the buffer. Tail always points
4444
// to the first element that could be read, Head always points
4545
// to where data should be written.
46-
// If tail == head the buffer is empty. The length of the ringbuf
46+
// If tail == head the buffer is empty. The length of the ringbuffer
4747
// is defined as the distance between the two.
4848

4949
tail: usize,
@@ -309,7 +309,7 @@ impl<T> VecDeque<T> {
309309
}
310310

311311
/// Reserves capacity for at least `additional` more elements to be inserted in the given
312-
/// `Ringbuf`. The collection may reserve more space to avoid frequent reallocations.
312+
/// `VecDeque`. The collection may reserve more space to avoid frequent reallocations.
313313
///
314314
/// # Panics
315315
///
@@ -385,10 +385,10 @@ impl<T> VecDeque<T> {
385385
}
386386
}
387387

388-
/// Shrinks the capacity of the ringbuf as much as possible.
388+
/// Shrinks the capacity of the `VecDeque` as much as possible.
389389
///
390390
/// It will drop down as close as possible to the length but the allocator may still inform the
391-
/// ringbuf that there is space for a few more elements.
391+
/// `VecDeque` that there is space for a few more elements.
392392
///
393393
/// # Examples
394394
///
@@ -404,7 +404,7 @@ impl<T> VecDeque<T> {
404404
/// ```
405405
pub fn shrink_to_fit(&mut self) {
406406
// +1 since the ringbuffer always leaves one space empty
407-
// len + 1 can't overflow for an existing, well-formed ringbuf.
407+
// len + 1 can't overflow for an existing, well-formed ringbuffer.
408408
let target_cap = cmp::max(self.len() + 1, MINIMUM_CAPACITY + 1).next_power_of_two();
409409
if target_cap < self.cap {
410410
// There are three cases of interest:
@@ -472,9 +472,9 @@ impl<T> VecDeque<T> {
472472
}
473473
}
474474

475-
/// Shortens a ringbuf, dropping excess elements from the back.
475+
/// Shortens a `VecDeque`, dropping excess elements from the back.
476476
///
477-
/// If `len` is greater than the ringbuf's current length, this has no
477+
/// If `len` is greater than the `VecDeque`'s current length, this has no
478478
/// effect.
479479
///
480480
/// # Examples
@@ -858,8 +858,8 @@ impl<T> VecDeque<T> {
858858
self.tail <= self.head
859859
}
860860

861-
/// Removes an element from anywhere in the ringbuf and returns it, replacing it with the last
862-
/// element.
861+
/// Removes an element from anywhere in the `VecDeque` and returns it, replacing it with the
862+
/// last element.
863863
///
864864
/// This does not preserve ordering, but is O(1).
865865
///
@@ -892,7 +892,7 @@ impl<T> VecDeque<T> {
892892
self.pop_back()
893893
}
894894

895-
/// Removes an element from anywhere in the ringbuf and returns it,
895+
/// Removes an element from anywhere in the `VecDeque` and returns it,
896896
/// replacing it with the first element.
897897
///
898898
/// This does not preserve ordering, but is O(1).
@@ -926,13 +926,13 @@ impl<T> VecDeque<T> {
926926
self.pop_front()
927927
}
928928

929-
/// Inserts an element at position `i` within the ringbuf. Whichever
929+
/// Inserts an element at position `i` within the `VecDeque`. Whichever
930930
/// end is closer to the insertion point will be moved to make room,
931931
/// and all the affected elements will be moved to new positions.
932932
///
933933
/// # Panics
934934
///
935-
/// Panics if `i` is greater than ringbuf's length
935+
/// Panics if `i` is greater than `VecDeque`'s length
936936
///
937937
/// # Examples
938938
/// ```
@@ -1132,7 +1132,7 @@ impl<T> VecDeque<T> {
11321132
}
11331133
}
11341134

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

14301430
impl<T: Clone> VecDeque<T> {
1431-
/// Modifies the ringbuf in-place so that `len()` is equal to new_len,
1431+
/// Modifies the `VecDeque` in-place so that `len()` is equal to new_len,
14321432
/// either by removing excess elements or by appending copies of a value to the back.
14331433
///
14341434
/// # 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

branches/stable/src/libterm/lib.rs

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

153153

154154
/// Terminal color definitions
155-
#[allow(missing_docs)]
156155
pub mod color {
157156
/// Number for a terminal color
158157
pub type Color = u16;

0 commit comments

Comments
 (0)