Skip to content

Commit 23262a8

Browse files
committed
auto merge of #13812 : alxgnon/rust/master, r=alexcrichton
This is a quick fix for repeated documentation descriptions in certain modules. Following is a list of the faulty modules I found. I ran `pcregrep -r -M "<p>(.+)\n\1" doc` on the html documentation to help identify them. - [rustuv::uvio](http://static.rust-lang.org/doc/master/rustuv/uvio/index.html) - [rustuv::uvll](http://static.rust-lang.org/doc/master/rustuv/uvll/index.html) - [std::rt::backtrace](http://static.rust-lang.org/doc/master/std/rt/backtrace/index.html) - [std::rt::env](http://static.rust-lang.org/doc/master/std/rt/env/index.html) - [std::rt::global_heap](http://static.rust-lang.org/doc/master/std/rt/global_heap/index.html) - [std::rt::local_heap](http://static.rust-lang.org/doc/master/std/rt/local_heap/index.html) - [std::rt::rtio](http://static.rust-lang.org/doc/master/std/rt/rtio/index.html) - [std::rt::task](http://static.rust-lang.org/doc/master/std/rt/task/index.html) - [std::rt::thread](http://static.rust-lang.org/doc/master/std/rt/thread/index.html) - [std::rt::unwind](http://static.rust-lang.org/doc/master/std/rt/unwind/index.html) - [syntax::parse::classify](http://static.rust-lang.org/doc/master/syntax/parse/classify/index.html) - [syntax::parse::common](http://static.rust-lang.org/doc/master/syntax/parse/common/index.html) After a little testing, I discovered that moving the documentation inside (`//!`) instead of outside (`///`) modules fixed the immediate problem. I went through the trouble of moving the documentation, and with this commit there are no more repeated descriptions within those faulty modules. This does not fix the underlying problem though. We should look into why having the documentation outside instead of inside caused the descriptions to be repeated. I will create a separate issue with my findings on the subject if necessary. In the meantime, this simple fix should be enough.
2 parents 1f4278d + 6c41253 commit 23262a8

File tree

10 files changed

+30
-25
lines changed

10 files changed

+30
-25
lines changed

src/librustuv/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,7 @@ mod homing;
8888
mod queue;
8989
mod rc;
9090

91-
/// The implementation of `rtio` for libuv
9291
pub mod uvio;
93-
94-
/// C bindings to libuv
9592
pub mod uvll;
9693

9794
pub mod file;

src/librustuv/uvio.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
//! The implementation of `rtio` for libuv
12+
1113
use std::c_str::CString;
1214
use std::cast;
1315
use std::io::IoError;

src/libstd/rt/backtrace.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
//! Simple backtrace functionality (to print on failure)
12+
1113
#![allow(non_camel_case_types)]
1214

1315
use char::Char;

src/libstd/rt/global_heap.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
12+
//! The global (exchange) heap.
13+
1114
use libc::{c_void, size_t, free, malloc, realloc};
1215
use ptr::{RawPtr, mut_null};
1316
use intrinsics::abort;

src/libstd/rt/mod.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,44 +85,44 @@ pub mod shouldnt_be_public {
8585
// Internal macros used by the runtime.
8686
mod macros;
8787

88-
/// The global (exchange) heap.
88+
// The global (exchange) heap.
8989
pub mod global_heap;
9090

91-
/// Implementations of language-critical runtime features like @.
91+
// Implementations of language-critical runtime features like @.
9292
pub mod task;
9393

94-
/// The EventLoop and internal synchronous I/O interface.
94+
// The EventLoop and internal synchronous I/O interface.
9595
pub mod rtio;
9696

97-
/// The Local trait for types that are accessible via thread-local
98-
/// or task-local storage.
97+
// The Local trait for types that are accessible via thread-local
98+
// or task-local storage.
9999
pub mod local;
100100

101-
/// Bindings to system threading libraries.
101+
// Bindings to system threading libraries.
102102
pub mod thread;
103103

104-
/// The runtime configuration, read from environment variables.
104+
// The runtime configuration, read from environment variables.
105105
pub mod env;
106106

107-
/// The local, managed heap
107+
// The local, managed heap
108108
pub mod local_heap;
109109

110-
/// The runtime needs to be able to put a pointer into thread-local storage.
110+
// The runtime needs to be able to put a pointer into thread-local storage.
111111
mod local_ptr;
112112

113-
/// Bindings to pthread/windows thread-local storage.
113+
// Bindings to pthread/windows thread-local storage.
114114
mod thread_local_storage;
115115

116-
/// Stack unwinding
116+
// Stack unwinding
117117
pub mod unwind;
118118

119-
/// The interface to libunwind that rust is using.
119+
// The interface to libunwind that rust is using.
120120
mod libunwind;
121121

122-
/// Simple backtrace functionality (to print on failure)
122+
// Simple backtrace functionality (to print on failure)
123123
pub mod backtrace;
124124

125-
/// Just stuff
125+
// Just stuff
126126
mod util;
127127

128128
// Global command line argument storage

src/libstd/rt/rtio.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
//! The EventLoop and internal synchronous I/O interface.
12+
1113
use c_str::CString;
1214
use cast;
1315
use comm::{Sender, Receiver};

src/libstd/rt/unwind.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
//! Stack unwinding
12+
1113
// Implementation of Rust stack unwinding
1214
//
1315
// For background on exception handling and stack unwinding please see

src/libsyntax/parse/classify.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
/*
12-
Predicates on exprs and stmts that the pretty-printer and parser use
13-
*/
11+
//! Routines the parser uses to classify AST nodes
12+
13+
// Predicates on exprs and stmts that the pretty-printer and parser use
1414

1515
use ast;
1616

src/libsyntax/parse/common.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
//! Common routines shared by parser mods
12+
1113
use parse::token;
1214

1315
// SeqSep : a sequence separator (token)

src/libsyntax/parse/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,8 @@ pub mod token;
2828
pub mod comments;
2929
pub mod attr;
3030

31-
/// Common routines shared by parser mods
3231
pub mod common;
33-
34-
/// Routines the parser uses to classify AST nodes
3532
pub mod classify;
36-
37-
/// Reporting obsolete syntax
3833
pub mod obsolete;
3934

4035
// info about a parsing session.

0 commit comments

Comments
 (0)