Skip to content

Commit 81e4999

Browse files
committed
Merge pull request #19710 from steveklabnik/gh15449
Fix inappropriate ## headings Reviewed-by: Gankro
2 parents f639a7e + 6780031 commit 81e4999

File tree

11 files changed

+22
-19
lines changed

11 files changed

+22
-19
lines changed

src/libcollections/tree/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//!
1616
//! `TreeMap`s are ordered.
1717
//!
18-
//! ## Example
18+
//! # Examples
1919
//!
2020
//! ```{rust}
2121
//! use std::collections::TreeSet;

src/libcollections/tree/set.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use tree_map::{TreeMap, Entries, RevEntries, MoveEntries};
2727
/// requirement is that the type of the elements contained ascribes to the
2828
/// `Ord` trait.
2929
///
30-
/// ## Examples
30+
/// # Examples
3131
///
3232
/// ```{rust}
3333
/// use std::collections::TreeSet;

src/libcore/simd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//! }
3030
//! ```
3131
//!
32-
//! ## Stability Note
32+
//! # Stability Note
3333
//!
3434
//! These are all experimental. The interface may change entirely, without
3535
//! warning.

src/libcore/str.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1757,9 +1757,9 @@ pub trait StrPrelude for Sized? {
17571757
/// }
17581758
/// ```
17591759
///
1760-
/// ## Output
1760+
/// This outputs:
17611761
///
1762-
/// ```ignore
1762+
/// ```text
17631763
/// 0: 中
17641764
/// 3: 华
17651765
/// 6: V

src/liblog/lib.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Utilities for program-wide and customizable logging
1212
//!
13-
//! ## Example
13+
//! # Examples
1414
//!
1515
//! ```
1616
//! #![feature(phase)]
@@ -64,8 +64,7 @@
6464
//! INFO:main: the answer was: 12
6565
//! ```
6666
//!
67-
//!
68-
//! ## Logging Macros
67+
//! # Logging Macros
6968
//!
7069
//! There are five macros that the logging subsystem uses:
7170
//!
@@ -86,7 +85,7 @@
8685
//!
8786
//! * `log_enabled!(level)` - returns true if logging of the given level is enabled
8887
//!
89-
//! ## Enabling logging
88+
//! # Enabling logging
9089
//!
9190
//! Log levels are controlled on a per-module basis, and by default all logging is
9291
//! disabled except for `error!` (a log level of 1). Logging is controlled via the
@@ -123,7 +122,7 @@
123122
//! * `hello,std::option` turns on hello, and std's option logging
124123
//! * `error,hello=warn` turn on global error logging and also warn for hello
125124
//!
126-
//! ## Filtering results
125+
//! # Filtering results
127126
//!
128127
//! A RUST_LOG directive may include a regex filter. The syntax is to append `/`
129128
//! followed by a regex. Each message is checked against the regex, and is only
@@ -143,7 +142,7 @@
143142
//! hello. In both cases the log message must include a single digit number
144143
//! followed by 'scopes'
145144
//!
146-
//! ## Performance and Side Effects
145+
//! # Performance and Side Effects
147146
//!
148147
//! Each of these macros will expand to code similar to:
149148
//!

src/librustdoc/html/toc.rs

+4
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ pub struct Toc {
2424
/// both of which end up in the same `Toc` as they have the same
2525
/// parent (Main).
2626
///
27+
/// ```text
2728
/// # Main
2829
/// ### A
2930
/// ## B
31+
/// ```
3032
entries: Vec<TocEntry>
3133
}
3234

@@ -78,6 +80,7 @@ impl TocBuilder {
7880
///
7981
/// Example:
8082
///
83+
/// ```text
8184
/// ## A
8285
/// # B
8386
/// # C
@@ -86,6 +89,7 @@ impl TocBuilder {
8689
/// ### F
8790
/// #### G
8891
/// ### H
92+
/// ```
8993
///
9094
/// If we are considering H (i.e. level 3), then A and B are in
9195
/// self.top_level, D is in C.children, and C, E, F, G are in

src/libstd/io/buffered.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl<R: Reader> BufferedReader<R> {
8080

8181
/// Gets a mutable reference to the underlying reader.
8282
///
83-
/// ## Warning
83+
/// # Warning
8484
///
8585
/// It is inadvisable to directly read from the underlying reader.
8686
pub fn get_mut(&mut self) -> &mut R { &mut self.inner }
@@ -185,7 +185,7 @@ impl<W: Writer> BufferedWriter<W> {
185185

186186
/// Gets a mutable reference to the underlying write.
187187
///
188-
/// ## Warning
188+
/// # Warning
189189
///
190190
/// It is inadvisable to directly read from the underlying writer.
191191
pub fn get_mut(&mut self) -> &mut W { self.inner.as_mut().unwrap() }
@@ -357,7 +357,7 @@ impl<S: Stream> BufferedStream<S> {
357357

358358
/// Gets a mutable reference to the underlying stream.
359359
///
360-
/// ## Warning
360+
/// # Warning
361361
///
362362
/// It is inadvisable to read directly from or write directly to the
363363
/// underlying stream.

src/libstd/io/stdio.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl StdinReader {
127127
///
128128
/// This provides access to methods like `chars` and `lines`.
129129
///
130-
/// ## Example
130+
/// # Examples
131131
///
132132
/// ```rust
133133
/// use std::io;

src/libstd/os.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ impl Copy for MapOption {}
12371237

12381238
/// Possible errors when creating a map.
12391239
pub enum MapError {
1240-
/// ## The following are POSIX-specific
1240+
/// # The following are POSIX-specific
12411241
///
12421242
/// fd was not open for reading or, if using `MapWritable`, was not open for
12431243
/// writing.
@@ -1259,7 +1259,7 @@ pub enum MapError {
12591259
ErrZeroLength,
12601260
/// Unrecognized error. The inner value is the unrecognized errno.
12611261
ErrUnknown(int),
1262-
/// ## The following are Windows-specific
1262+
/// # The following are Windows-specific
12631263
///
12641264
/// Unsupported combination of protection flags
12651265
/// (`MapReadable`/`MapWritable`/`MapExecutable`).

src/libstd/task.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
//! the main task panics the application will exit with a non-zero
3333
//! exit code.
3434
//!
35-
//! ## Example
35+
//! # Examples
3636
//!
3737
//! ```rust
3838
//! spawn(move|| {

src/libterm/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//! [terminfo][ti] database, and `WinConsole`, which uses the [Win32 Console
1717
//! API][win].
1818
//!
19-
//! ## Example
19+
//! # Examples
2020
//!
2121
//! ```no_run
2222
//! extern crate term;

0 commit comments

Comments
 (0)