Skip to content

Commit cc11307

Browse files
committed
Auto merge of #118353 - matthiaskrgr:rollup-sf1booi, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - #118322 (skip {tidy,compiletest,rustdoc-gui} based tests for `DocTests::Only`) - #118325 (Fix Rustdoc search docs link) - #118338 (Backticks fixes) r? `@ghost` `@rustbot` modify labels: rollup
2 parents a191610 + 96cd028 commit cc11307

File tree

4 files changed

+17
-10
lines changed
  • compiler
  • src

4 files changed

+17
-10
lines changed

compiler/rustc_ast_pretty/src/pprust/state.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ pub fn print_crate<'a>(
151151
/// Note: some old proc macros parse pretty-printed output, so changes here can
152152
/// break old code. For example:
153153
/// - #63896: `#[allow(unused,` must be printed rather than `#[allow(unused ,`
154-
/// - #73345: `#[allow(unused)] must be printed rather than `# [allow(unused)]
154+
/// - #73345: `#[allow(unused)]` must be printed rather than `# [allow(unused)]`
155155
///
156156
fn space_between(tt1: &TokenTree, tt2: &TokenTree) -> bool {
157157
use token::*;

compiler/rustc_index_macros/src/lib.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ mod newtype;
2323
/// The impls provided by default are Clone, Copy, PartialEq, Eq, and Hash.
2424
///
2525
/// Accepted attributes for customization:
26-
/// - #[derive(HashStable_Generic)]/#[derive(HashStable)]: derives
26+
/// - `#[derive(HashStable_Generic)]`/`#[derive(HashStable)]`: derives
2727
/// `HashStable`, as normal.
28-
/// - #[encodable]: derives `Encodable`/`Decodable`.
29-
/// - #[orderable]: derives `PartialOrd`/`Ord`, plus step-related methods.
30-
/// - #[debug_format = "Foo({})"]: derives `Debug` with particular output.
31-
/// - #[max = 0xFFFF_FFFD]: specifies the max value, which allows niche
28+
/// - `#[encodable]`: derives `Encodable`/`Decodable`.
29+
/// - `#[orderable]`: derives `PartialOrd`/`Ord`, plus step-related methods.
30+
/// - `#[debug_format = "Foo({})"]`: derives `Debug` with particular output.
31+
/// - `#[max = 0xFFFF_FFFD]`: specifies the max value, which allows niche
3232
/// optimizations. The default max value is 0xFFFF_FF00.
33-
/// - #[gate_rustc_only]: makes parts of the generated code nightly-only.
33+
/// - `#[gate_rustc_only]`: makes parts of the generated code nightly-only.
3434
#[proc_macro]
3535
#[cfg_attr(
3636
feature = "nightly",

src/bootstrap/src/core/build_steps/test.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,7 @@ impl Step for RustdocGUI {
999999
let run = run.suite_path("tests/rustdoc-gui");
10001000
run.lazy_default_condition(Box::new(move || {
10011001
builder.config.nodejs.is_some()
1002+
&& builder.doc_tests != DocTests::Only
10021003
&& builder
10031004
.config
10041005
.npm
@@ -1158,7 +1159,8 @@ HELP: to skip test's attempt to check tidiness, pass `--skip src/tools/tidy` to
11581159
}
11591160

11601161
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
1161-
run.path("src/tools/tidy")
1162+
let default = run.builder.doc_tests != DocTests::Only;
1163+
run.path("src/tools/tidy").default_condition(default)
11621164
}
11631165

11641166
fn make_run(run: RunConfig<'_>) {
@@ -1560,6 +1562,10 @@ impl Step for Compiletest {
15601562
/// compiletest `mode` and `suite` arguments. For example `mode` can be
15611563
/// "run-pass" or `suite` can be something like `debuginfo`.
15621564
fn run(self, builder: &Builder<'_>) {
1565+
if builder.doc_tests == DocTests::Only {
1566+
return;
1567+
}
1568+
15631569
if builder.top_stage == 0 && env::var("COMPILETEST_FORCE_STAGE0").is_err() {
15641570
eprintln!("\
15651571
ERROR: `--stage 0` runs compiletest on the beta compiler, not your local changes, and will almost always cause tests to fail
@@ -2323,6 +2329,8 @@ impl Step for CrateLibrustc {
23232329
}
23242330

23252331
fn run(self, builder: &Builder<'_>) {
2332+
builder.ensure(compile::Std::new(self.compiler, self.target));
2333+
23262334
builder.ensure(Crate {
23272335
compiler: self.compiler,
23282336
target: self.target,

src/librustdoc/html/static/js/main.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1318,8 +1318,7 @@ function preLoadCss(cssUrl) {
13181318

13191319
const infos = [
13201320
`For a full list of all search features, take a look <a \
1321-
href="https://doc.rust-lang.org/${channel}/rustdoc/how-to-read-rustdoc.html\
1322-
#the-search-interface">here</a>.`,
1321+
href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.html">here</a>.`,
13231322
"Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to \
13241323
restrict the search to a given item kind.",
13251324
"Accepted kinds are: <code>fn</code>, <code>mod</code>, <code>struct</code>, \

0 commit comments

Comments
 (0)