Skip to content

Commit 32b6bb3

Browse files
committed
---
yaml --- r: 235173 b: refs/heads/stable c: 8c7fd35 h: refs/heads/master i: 235171: 6f73a01 v: v3
1 parent c01353b commit 32b6bb3

File tree

14 files changed

+80
-21
lines changed

14 files changed

+80
-21
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: 8e2ce46d990e8c84cd375662f43e740394e9ab40
32+
refs/heads/stable: 8c7fd357e0b8775c47c79fdd07b58fa1aac0b92a
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: 10 additions & 5 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

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/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;

branches/stable/src/libterm/terminfo/parser/compiled.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use super::super::TermInfo;
1919

2020
// These are the orders ncurses uses in its compiled format (as of 5.9). Not sure if portable.
2121

22+
#[allow(missing_docs)]
2223
pub static boolfnames: &'static[&'static str] = &["auto_left_margin", "auto_right_margin",
2324
"no_esc_ctlc", "ceol_standout_glitch", "eat_newline_glitch", "erase_overstrike", "generic_type",
2425
"hard_copy", "has_meta_key", "has_status_line", "insert_null_glitch", "memory_above",
@@ -31,11 +32,13 @@ pub static boolfnames: &'static[&'static str] = &["auto_left_margin", "auto_righ
3132
"no_correctly_working_cr", "gnu_has_meta_key", "linefeed_is_newline", "has_hardware_tabs",
3233
"return_does_clr_eol"];
3334

35+
#[allow(missing_docs)]
3436
pub static boolnames: &'static[&'static str] = &["bw", "am", "xsb", "xhp", "xenl", "eo",
3537
"gn", "hc", "km", "hs", "in", "db", "da", "mir", "msgr", "os", "eslok", "xt", "hz", "ul", "xon",
3638
"nxon", "mc5i", "chts", "nrrmc", "npc", "ndscr", "ccc", "bce", "hls", "xhpa", "crxm", "daisy",
3739
"xvpa", "sam", "cpix", "lpix", "OTbs", "OTns", "OTnc", "OTMT", "OTNL", "OTpt", "OTxr"];
3840

41+
#[allow(missing_docs)]
3942
pub static numfnames: &'static[&'static str] = &[ "columns", "init_tabs", "lines",
4043
"lines_of_memory", "magic_cookie_glitch", "padding_baud_rate", "virtual_terminal",
4144
"width_status_line", "num_labels", "label_height", "label_width", "max_attributes",
@@ -46,11 +49,13 @@ pub static numfnames: &'static[&'static str] = &[ "columns", "init_tabs", "lines
4649
"bit_image_entwining", "bit_image_type", "magic_cookie_glitch_ul", "carriage_return_delay",
4750
"new_line_delay", "backspace_delay", "horizontal_tab_delay", "number_of_function_keys"];
4851

52+
#[allow(missing_docs)]
4953
pub static numnames: &'static[&'static str] = &[ "cols", "it", "lines", "lm", "xmc", "pb",
5054
"vt", "wsl", "nlab", "lh", "lw", "ma", "wnum", "colors", "pairs", "ncv", "bufsz", "spinv",
5155
"spinh", "maddr", "mjump", "mcs", "mls", "npins", "orc", "orl", "orhi", "orvi", "cps", "widcs",
5256
"btns", "bitwin", "bitype", "UTug", "OTdC", "OTdN", "OTdB", "OTdT", "OTkn"];
5357

58+
#[allow(missing_docs)]
5459
pub static stringfnames: &'static[&'static str] = &[ "back_tab", "bell", "carriage_return",
5560
"change_scroll_region", "clear_all_tabs", "clear_screen", "clr_eol", "clr_eos",
5661
"column_address", "command_character", "cursor_address", "cursor_down", "cursor_home",
@@ -124,6 +129,7 @@ pub static stringfnames: &'static[&'static str] = &[ "back_tab", "bell", "carria
124129
"acs_lrcorner", "acs_ltee", "acs_rtee", "acs_btee", "acs_ttee", "acs_hline", "acs_vline",
125130
"acs_plus", "memory_lock", "memory_unlock", "box_chars_1"];
126131

132+
#[allow(missing_docs)]
127133
pub static stringnames: &'static[&'static str] = &[ "cbt", "_", "cr", "csr", "tbc", "clear",
128134
"_", "_", "hpa", "cmdch", "cup", "cud1", "home", "civis", "cub1", "mrcup", "cnorm", "cuf1",
129135
"ll", "cuu1", "cvvis", "dch1", "dl1", "dsl", "hd", "smacs", "blink", "bold", "smcup", "smdc",

branches/stable/src/test/compile-fail/coherence-orphan.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ impl TheTrait<isize> for TheType { }
2727

2828
impl !Send for Vec<isize> { }
2929
//~^ ERROR E0117
30-
//~| ERROR E0119
3130

3231
fn main() { }

branches/stable/src/test/compile-fail/lint-missing-doc.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,27 @@ pub enum PubBaz3 {
149149
#[doc(hidden)]
150150
pub fn baz() {}
151151

152+
153+
const FOO: u32 = 0;
154+
/// dox
155+
pub const FOO1: u32 = 0;
156+
#[allow(missing_docs)]
157+
pub const FOO2: u32 = 0;
158+
#[doc(hidden)]
159+
pub const FOO3: u32 = 0;
160+
pub const FOO4: u32 = 0; //~ ERROR: missing documentation for a const
161+
162+
163+
static BAR: u32 = 0;
164+
/// dox
165+
pub static BAR1: u32 = 0;
166+
#[allow(missing_docs)]
167+
pub static BAR2: u32 = 0;
168+
#[doc(hidden)]
169+
pub static BAR3: u32 = 0;
170+
pub static BAR4: u32 = 0; //~ ERROR: missing documentation for a static
171+
172+
152173
mod internal_impl {
153174
/// dox
154175
pub fn documented() {}

0 commit comments

Comments
 (0)