Skip to content

Commit 10c2ce5

Browse files
committed
Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnik
Cosmetic improvements to doc comments This has been factored out from rust-lang/rust#58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2 parents 7643db6 + 9f34a75 commit 10c2ce5

File tree

4 files changed

+26
-26
lines changed

4 files changed

+26
-26
lines changed

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

0 commit comments

Comments
 (0)