Skip to content

Commit 568f9a6

Browse files
author
Alexander Regueiro
committed
tools: doc comments
1 parent 99ed06e commit 568f9a6

File tree

7 files changed

+30
-30
lines changed

7 files changed

+30
-30
lines changed

src/tools/compiletest/src/common.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,31 +113,31 @@ impl CompareMode {
113113

114114
#[derive(Clone)]
115115
pub struct Config {
116-
/// Whether to overwrite stderr/stdout files instead of complaining about changes in output
116+
/// `true` to to overwrite stderr/stdout files instead of complaining about changes in output.
117117
pub bless: bool,
118118

119-
/// The library paths required for running the compiler
119+
/// The library paths required for running the compiler.
120120
pub compile_lib_path: PathBuf,
121121

122-
/// The library paths required for running compiled programs
122+
/// The library paths required for running compiled programs.
123123
pub run_lib_path: PathBuf,
124124

125-
/// The rustc executable
125+
/// The rustc executable.
126126
pub rustc_path: PathBuf,
127127

128-
/// The rustdoc executable
128+
/// The rustdoc executable.
129129
pub rustdoc_path: Option<PathBuf>,
130130

131-
/// The python executable to use for LLDB
131+
/// The Python executable to use for LLDB.
132132
pub lldb_python: String,
133133

134-
/// The python executable to use for htmldocck
134+
/// The Python executable to use for htmldocck.
135135
pub docck_python: String,
136136

137-
/// The llvm FileCheck binary path
137+
/// The LLVM `FileCheck` binary path.
138138
pub llvm_filecheck: Option<PathBuf>,
139139

140-
/// The valgrind path
140+
/// The valgrind path.
141141
pub valgrind_path: Option<String>,
142142

143143
/// Whether to fail if we can't run run-pass-valgrind tests under valgrind
@@ -305,15 +305,15 @@ pub fn output_testname_unique(
305305
}
306306

307307
/// Absolute path to the directory where all output for the given
308-
/// test/revision should reside. Example:
308+
/// test/revision should reside. Example:
309309
/// /path/to/build/host-triple/test/ui/relative/testname.revision.mode/
310310
pub fn output_base_dir(config: &Config, testpaths: &TestPaths, revision: Option<&str>) -> PathBuf {
311311
output_relative_path(config, &testpaths.relative_dir)
312312
.join(output_testname_unique(config, testpaths, revision))
313313
}
314314

315315
/// Absolute path to the base filename used as output for the given
316-
/// test/revision. Example:
316+
/// test/revision. Example:
317317
/// /path/to/build/host-triple/test/ui/relative/testname.revision.mode/testname
318318
pub fn output_base_name(config: &Config, testpaths: &TestPaths, revision: Option<&str>) -> PathBuf {
319319
output_base_dir(config, testpaths, revision).join(testpaths.file.file_stem().unwrap())

src/tools/compiletest/src/header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::extract_gdb_version;
1212
/// Whether to ignore the test.
1313
#[derive(Clone, Copy, PartialEq, Debug)]
1414
pub enum Ignore {
15-
/// Run it.
15+
/// Runs it.
1616
Run,
1717
/// Ignore it totally.
1818
Ignore,
@@ -389,7 +389,7 @@ impl TestProps {
389389
props
390390
}
391391

392-
/// Load properties from `testfile` into `props`. If a property is
392+
/// Loads properties from `testfile` into `props`. If a property is
393393
/// tied to a particular revision `foo` (indicated by writing
394394
/// `//[foo]`), then the property is ignored unless `cfg` is
395395
/// `Some("foo")`.

src/tools/compiletest/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ fn make_test_closure(
808808
}))
809809
}
810810

811-
/// Returns true if the given target is an Android target for the
811+
/// Returns `true` if the given target is an Android target for the
812812
/// purposes of GDB testing.
813813
fn is_android_gdb_target(target: &String) -> bool {
814814
match &target[..] {

src/tools/compiletest/src/runtest.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ impl<'test> TestCx<'test> {
13791379
}
13801380
}
13811381

1382-
/// Returns true if we should report an error about `actual_error`,
1382+
/// Returns `true` if we should report an error about `actual_error`,
13831383
/// which did not match any of the expected error. We always require
13841384
/// errors/warnings to be explicitly listed, but only require
13851385
/// helps/notes if there are explicit helps/notes given.
@@ -1974,14 +1974,14 @@ impl<'test> TestCx<'test> {
19741974
fs::write(&outfile, out).unwrap();
19751975
}
19761976

1977-
/// Create a filename for output with the given extension. Example:
1978-
/// /.../testname.revision.mode/testname.extension
1977+
/// Creates a filename for output with the given extension.
1978+
/// E.g., `/.../testname.revision.mode/testname.extension`.
19791979
fn make_out_name(&self, extension: &str) -> PathBuf {
19801980
self.output_base_name().with_extension(extension)
19811981
}
19821982

1983-
/// Directory where auxiliary files are written. Example:
1984-
/// /.../testname.revision.mode/auxiliary/
1983+
/// Gets the directory where auxiliary files are written.
1984+
/// E.g., `/.../testname.revision.mode/auxiliary/`.
19851985
fn aux_output_dir_name(&self) -> PathBuf {
19861986
self.output_base_dir()
19871987
.join("auxiliary")
@@ -1993,7 +1993,7 @@ impl<'test> TestCx<'test> {
19931993
output_testname_unique(self.config, self.testpaths, self.safe_revision())
19941994
}
19951995

1996-
/// The revision, ignored for Incremental since it wants all revisions in
1996+
/// The revision, ignored for incremental compilation since it wants all revisions in
19971997
/// the same directory.
19981998
fn safe_revision(&self) -> Option<&str> {
19991999
if self.config.mode == Incremental {
@@ -2003,16 +2003,16 @@ impl<'test> TestCx<'test> {
20032003
}
20042004
}
20052005

2006-
/// Absolute path to the directory where all output for the given
2007-
/// test/revision should reside. Example:
2008-
/// /path/to/build/host-triple/test/ui/relative/testname.revision.mode/
2006+
/// Gets the absolute path to the directory where all output for the given
2007+
/// test/revision should reside.
2008+
/// E.g., `/path/to/build/host-triple/test/ui/relative/testname.revision.mode/`.
20092009
fn output_base_dir(&self) -> PathBuf {
20102010
output_base_dir(self.config, self.testpaths, self.safe_revision())
20112011
}
20122012

2013-
/// Absolute path to the base filename used as output for the given
2014-
/// test/revision. Example:
2015-
/// /.../relative/testname.revision.mode/testname
2013+
/// Gets the absolute path to the base filename used as output for the given
2014+
/// test/revision.
2015+
/// E.g., `/.../relative/testname.revision.mode/testname`.
20162016
fn output_base_name(&self) -> PathBuf {
20172017
output_base_name(self.config, self.testpaths, self.safe_revision())
20182018
}

src/tools/error_index_generator/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ impl Formatter for MarkdownFormatter {
194194
}
195195
}
196196

197-
/// Load all the metadata files from `metadata_dir` into an in-memory map.
197+
/// Loads all the metadata files from `metadata_dir` into an in-memory map.
198198
fn load_all_errors(metadata_dir: &Path) -> Result<ErrorMetadataMap, Box<dyn Error>> {
199199
let mut all_errors = BTreeMap::new();
200200

src/tools/tidy/src/style.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ enum LIUState {
4444
EXP_END,
4545
}
4646

47-
/// Returns whether `line` appears to be a line comment containing an URL,
47+
/// Returns `true` if `line` appears to be a line comment containing an URL,
4848
/// possibly with a Markdown link label in front, and nothing else.
4949
/// The Markdown link label, if present, may not contain whitespace.
5050
/// Lines of this form are allowed to be overlength, because Markdown
@@ -79,7 +79,7 @@ fn line_is_url(line: &str) -> bool {
7979
state == EXP_END
8080
}
8181

82-
/// Returns whether `line` is allowed to be longer than the normal limit.
82+
/// Returns `true` if `line` is allowed to be longer than the normal limit.
8383
/// Currently there is only one exception, for long URLs, but more
8484
/// may be added in the future.
8585
fn long_line_is_ok(line: &str) -> bool {

src/tools/tidy/src/unstable_book.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn collect_unstable_book_section_file_names(dir: &path::Path) -> BTreeSet<St
5656
.collect()
5757
}
5858

59-
/// Retrieve file names of all library feature sections in the Unstable Book with:
59+
/// Retrieves file names of all library feature sections in the Unstable Book with:
6060
///
6161
/// * hyphens replaced by underscores,
6262
/// * the markdown suffix ('.md') removed.

0 commit comments

Comments
 (0)