Skip to content

Rustdoc bang attr macro#152449

Open
GuillaumeGomez wants to merge 11 commits intorust-lang:mainfrom
GuillaumeGomez:rustdoc-bang-attr-macro
Open

Rustdoc bang attr macro#152449
GuillaumeGomez wants to merge 11 commits intorust-lang:mainfrom
GuillaumeGomez:rustdoc-bang-attr-macro

Conversation

@GuillaumeGomez
Copy link
Copy Markdown
Member

@GuillaumeGomez GuillaumeGomez commented Feb 10, 2026

View all comments

Since it seems like I can't reopen #145458, opening this one. Although, it's the same PR minus the last new commit to handle a comment that was left unresolved in the original PR. All relevant details are still in the original PR though.

It's an alternative (and likely a take-over) of #148005 since lang-team rejected the idea to add documentation on macro branches, making the multiple files approach less suitable.

This implements #145153 in rustdoc. This PR voluntarily doesn't touch anything related to intra-doc links, I'll send a follow-up if needed.

So now about the implementation itself: this is a weird case where a macro can be different things at once but still only gets one file generated. I saw two ways to implement this:

  1. Handle ItemKind::Macro differently and iter through its MacroKinds values.
  2. Add new placeholder variants in the ItemKind enum, which means that when we encounter them in rendering, we need to ignore them. It also makes the ItemKind enum bigger (and also needs more code to be handled). Another downside is that it needs to be handled in the JSON output.

Now there was an interesting improvement that came with this PR in the html::render::print_item::item_module function: I simplified its implementation and split the different parts in a HashMap where the key is the item type. So then, we can just iterate through the keys and open/close the section at each iteration instead of keeping an Option<section> around.

From RFCs:

derive:

Screenshot From 2026-04-18 03-11-40

attr:

Screenshot From 2026-04-18 03-11-31

both:

Screenshot From 2026-04-18 03-11-50

r? @notriddle

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Feb 10, 2026

Some changes occurred in HTML/CSS/JS.

cc @lolbinarycat

@rustbot rustbot added A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Feb 10, 2026
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the rustdoc-bang-attr-macro branch from 20f13be to 4b35c49 Compare February 10, 2026 18:18
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the rustdoc-bang-attr-macro branch from 4b35c49 to 4416897 Compare February 10, 2026 20:25
@GuillaumeGomez
Copy link
Copy Markdown
Member Author

Oh and also cc @lolbinarycat as you reviewed the original PR too. :)

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the rustdoc-bang-attr-macro branch from 4416897 to be7815f Compare February 10, 2026 20:41
@rust-bors

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the rustdoc-bang-attr-macro branch from be7815f to 3e05767 Compare February 20, 2026 12:05
@rustbot

This comment has been minimized.

@GuillaumeGomez
Copy link
Copy Markdown
Member Author

Fixed merge conflicts.

@rust-bors

This comment has been minimized.

@lolbinarycat
Copy link
Copy Markdown
Contributor

blocking this on #154902, since that relies on bang macro === macro_rules macro.

@GuillaumeGomez GuillaumeGomez force-pushed the rustdoc-bang-attr-macro branch from 3e05767 to ce98d4e Compare April 7, 2026 16:31
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Comment thread tests/rustdoc-gui/src/test_docs/macros.rs Outdated
@GuillaumeGomez GuillaumeGomez force-pushed the rustdoc-bang-attr-macro branch from ce98d4e to 5ada01c Compare April 7, 2026 22:44
@GuillaumeGomez GuillaumeGomez force-pushed the rustdoc-bang-attr-macro branch from 5ada01c to 26f32d9 Compare April 17, 2026 23:13
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 17, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@GuillaumeGomez GuillaumeGomez force-pushed the rustdoc-bang-attr-macro branch from 26f32d9 to eef2a58 Compare April 18, 2026 01:11
@GuillaumeGomez GuillaumeGomez force-pushed the rustdoc-bang-attr-macro branch from eef2a58 to cbe154c Compare April 18, 2026 15:46
@GuillaumeGomez
Copy link
Copy Markdown
Member Author

Ready for review.

Copy link
Copy Markdown
Contributor

@lolbinarycat lolbinarycat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After reading through everything it seems there's still some level of conflation between declarative (macro_rules! and v2 macros) and procedural macros.

I still feel like our data model for macros is a bit of a mess, and there doesn't seem to be a clear vision of what the desired end state is, at least not one I have access to.

The search handling I'm also unsure about the design of. Remember we have itemParents now, that could be useful here.

I also worry about if cross-crate inlining breaks any of this stuff. In general, I think the test coverage is a bit lacking, there are only 7 potential cases1, but not a single test suite covers all of them.

View changes since this review

Footnotes

  1. I guess doubled to 14 if you want to do all of them through cross-crate reexports too

Comment on lines +2909 to +2910
MacroKinds::ATTR => clean_proc_macro(item, &mut name, MacroKind::Attr, cx.tcx),
MacroKinds::DERIVE => clean_proc_macro(item, &mut name, MacroKind::Derive, cx.tcx),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is wrong, a macro_rules! macro should be able to go into this branch, which does not seem ideal.

Do we really not have a way of just... checking if something is a proc macro or not? can clean_proc_macro handle being given a non-proc macro?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, if macro_rules! containing only an attr or a derive, we treat them the same as their proc-macro equivalent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that the desired behavior? it seems somewhat odd.

Comment thread src/librustdoc/clean/mod.rs Outdated
Comment on lines +2902 to +2907
MacroKinds::BANG => MacroItem(
Macro {
source: display_macro_source(cx.tcx, name, macro_def),
macro_rules: macro_def.macro_rules,
},
MacroKinds::BANG,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch is strictly redundant with the last branch, and can just be removed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Comment on lines +104 to +105
BangMacroAttribute = 28,
BangMacroDerive = 29,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These feel like misnomers, a "bang macro" generally refers to a fn-like macro, called with !(), not just anything declared with macro_rules!. also could definitely benefit from doc comments.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's about how they're declared, not how they're used. Big +1 for the missing docs, adding that.

Copy link
Copy Markdown
Contributor

@lolbinarycat lolbinarycat Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

problem is that's not what "bang macro" conventionally means, and i would rather not introduce more instances of "this term is used completely differently within rustdoc".

i would prefer we just use "DeclMaro", as both of these can be grouped under "declarative macros"

Comment thread src/librustdoc/clean/types.rs Outdated
Comment on lines +772 to +774
pub(crate) fn is_macro_rules(&self) -> bool {
matches!(self.kind, ItemKind::MacroItem(..))
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems incorrect, shouldn't we be checking the macro_rules field?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I keep forgetting that we can declare bang macros like functions. I'll rename the function and add docs to clarify what it checks.

Comment thread src/librustdoc/clean/utils.rs Outdated
Comment on lines +620 to +622
tokens.next();
tokens.next();
tokens.next();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe some assertions or debug assertions here so it doesn't silently break horribly if macro syntax changes again?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough.

Comment on lines -789 to +797
block("attr", "attributes", "Attribute Macros");
block("attr", "attribute-macros", "Attribute Macros");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once again, not a fan of bugfixes that break links being buried within a larger change like this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed for tests.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah... it might be better to rename the other block, as that should break drastically less links

* But the documentation lives in a single `macro.NAME.html` page, and
* this boolean flag is used for generating that HREF.
*/
isBangMacro: boolean,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like this field name.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open to suggestions. :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem is the current semantics are "is this a non-proc macro that is usable in multiple ways or is fn-like"

i think naming it based on purpose rather than on definition would be good, so forceMacroHref.

Comment on lines +1663 to +1669
if (item.ty === 28 || item.ty === 29) {
// "proc attribute" is 23, "proc derive" is 24 whereas "bang macro attribute" is 28 and
// "bang macro derive" is 29, so 5 of difference to go from the latter to the former.
item.ty -= 5;
item.isBangMacro = true;
}
return item;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, so this is the point of adding those two enum variants...

I do wonder if there's a better way to encode this...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely not but very interested if you have ideas.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could overload the last field even more x3

let href;
let traitPath = null;
const type = itemTypesName[item.ty];
const type = item.entry && item.entry.isBangMacro ? "macro" : itemTypesName[item.ty];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, these hybrid macros will show up with attr: and derive: searches but will have macro in the url? seems confusing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the whole debate we had 2 rustdoc meetings ago. The alternative was to have a file for each kind of the macro but this approach was rejected.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

derive and attr are children of macro, so it should be fine.

Comment on lines +6 to +25
/// An attribute bang macro.
#[macro_export]
macro_rules! attr_macro {
attr() () => {};
() => {};
}

/// A derive bang macro.
#[macro_export]
macro_rules! derive_macro {
derive() () => {};
() => {};
}

#[macro_export]
macro_rules! one_for_all_macro {
attr() () => {};
derive() () => {};
() => {};
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about something of the shape of:

#[macro_export]
macro_rules! attr_macro {
    attr() () => {};
}

or

#[macro_export]
macro_rules! one_for_all_macro {
    attr() () => {};
    derive() () => {};
}

I suspect the former may show up as a proc macro.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm it would. Adding a test to cover them.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah it's already tested in tests/rustdoc-html/macro/macro-attr.rs actually. :)

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 22, 2026
@GuillaumeGomez
Copy link
Copy Markdown
Member Author

Went through all comments and pushed improvements and suggestions (and a new test). So if I didn't miss anything, only tests missing are for cross-crate, right?

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the rustdoc-bang-attr-macro branch from 6058428 to 76a6846 Compare April 24, 2026 01:26
@GuillaumeGomez
Copy link
Copy Markdown
Member Author

The debug_assert_matches I added were too strict on the matching, so I relaxed them a bit. But still a super good idea. :)

@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
Executing "/scripts/stage_2_test_set2.sh"
+ /scripts/stage_2_test_set2.sh
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest
PR_CI_JOB set; skipping tidy
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
---
##[endgroup]
[TIMING:end] tool::ToolBuild { build_compiler: Compiler { stage: 0, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu, tool: "linkchecker", path: "src/tools/linkchecker", mode: ToolBootstrap, source_type: InTree, extra_features: [], allow_features: "", cargo_args: [], artifact_kind: Binary } -- 0.134
[TIMING:end] tool::Linkchecker { compiler: Compiler { stage: 0, host: aarch64-unknown-linux-gnu, forced_compiler: false }, target: aarch64-unknown-linux-gnu } -- 0.000
##[group]Testing stage1 Linkcheck (aarch64-unknown-linux-gnu)
proc_macro/index.html:7: broken link - `proc_macro/mod.token_stream.html`
proc_macro/index.html:7: broken link - `proc_macro/mod.tracked.html`
test/index.html:9: broken link - `test/mod.bench.html`
test/index.html:9: broken link - `test/mod.stats.html`
test/index.html:9: broken link - `test/mod.test.html`
std/index.html:151: broken link - `std/mod.alloc.html`
std/index.html:151: broken link - `std/mod.any.html`
std/index.html:151: broken link - `std/mod.arch.html`
std/index.html:151: broken link - `std/mod.array.html`
std/index.html:151: broken link - `std/mod.ascii.html`
std/index.html:151: broken link - `std/mod.backtrace.html`
std/index.html:151: broken link - `std/mod.borrow.html`
std/index.html:151: broken link - `std/mod.boxed.html`
std/index.html:151: broken link - `std/mod.cell.html`
std/index.html:151: broken link - `std/mod.char.html`
std/index.html:151: broken link - `std/mod.clone.html`
std/index.html:151: broken link - `std/mod.cmp.html`
std/index.html:151: broken link - `std/mod.collections.html`
std/index.html:151: broken link - `std/mod.convert.html`
std/index.html:151: broken link - `std/mod.default.html`
std/index.html:151: broken link - `std/mod.env.html`
std/index.html:151: broken link - `std/mod.error.html`
std/index.html:151: broken link - `std/mod.f32.html`
std/index.html:151: broken link - `std/mod.f64.html`
std/index.html:151: broken link - `std/mod.ffi.html`
std/index.html:151: broken link - `std/mod.fmt.html`
std/index.html:151: broken link - `std/mod.fs.html`
std/index.html:151: broken link - `std/mod.future.html`
std/index.html:151: broken link - `std/mod.hash.html`
std/index.html:151: broken link - `std/mod.hint.html`
std/index.html:151: broken link - `std/mod.i8.html`
std/index.html:151: broken link - `std/mod.i16.html`
std/index.html:151: broken link - `std/mod.i32.html`
std/index.html:151: broken link - `std/mod.i64.html`
std/index.html:151: broken link - `std/mod.i128.html`
std/index.html:151: broken link - `std/mod.io.html`
std/index.html:151: broken link - `std/mod.isize.html`
std/index.html:151: broken link - `std/mod.iter.html`
std/index.html:151: broken link - `std/mod.marker.html`
std/index.html:151: broken link - `std/mod.mem.html`
std/index.html:151: broken link - `std/mod.net.html`
std/index.html:151: broken link - `std/mod.num.html`
std/index.html:151: broken link - `std/mod.ops.html`
std/index.html:151: broken link - `std/mod.option.html`
std/index.html:151: broken link - `std/mod.os.html`
std/index.html:151: broken link - `std/mod.panic.html`
std/index.html:151: broken link - `std/mod.path.html`
std/index.html:151: broken link - `std/mod.pin.html`
std/index.html:151: broken link - `std/mod.prelude.html`
std/index.html:151: broken link - `std/mod.primitive.html`
std/index.html:152: broken link - `std/mod.process.html`
std/index.html:152: broken link - `std/mod.ptr.html`
std/index.html:152: broken link - `std/mod.range.html`
std/index.html:152: broken link - `std/mod.rc.html`
std/index.html:153: broken link - `std/mod.result.html`
std/index.html:153: broken link - `std/mod.slice.html`
std/index.html:153: broken link - `std/mod.str.html`
std/index.html:153: broken link - `std/mod.string.html`
std/index.html:153: broken link - `std/mod.sync.html`
std/index.html:153: broken link - `std/mod.task.html`
std/index.html:153: broken link - `std/mod.thread.html`
std/index.html:153: broken link - `std/mod.time.html`
std/index.html:153: broken link - `std/mod.u8.html`
std/index.html:153: broken link - `std/mod.u16.html`
std/index.html:153: broken link - `std/mod.u32.html`
std/index.html:153: broken link - `std/mod.u64.html`
std/index.html:153: broken link - `std/mod.u128.html`
std/index.html:153: broken link - `std/mod.usize.html`
std/index.html:153: broken link - `std/mod.vec.html`
std/index.html:154: broken link - `std/mod.async_iter.html`
std/index.html:154: broken link - `std/mod.autodiff.html`
std/index.html:156: broken link - `std/mod.bstr.html`
std/index.html:156: broken link - `std/mod.f16.html`
std/index.html:156: broken link - `std/mod.f128.html`
std/index.html:156: broken link - `std/mod.field.html`
std/index.html:156: broken link - `std/mod.from.html`
std/index.html:156: broken link - `std/mod.intrinsics.html`
std/index.html:156: broken link - `std/mod.pat.html`
std/index.html:156: broken link - `std/mod.random.html`
std/index.html:156: broken link - `std/mod.simd.html`
std/index.html:156: broken link - `std/mod.unsafe_binder.html`
std/env/index.html:8: broken link - `std/env/mod.consts.html`
std/collections/index.html:350: broken link - `std/collections/mod.binary_heap.html`
std/collections/index.html:350: broken link - `std/collections/mod.btree_map.html`
std/collections/index.html:350: broken link - `std/collections/mod.btree_set.html`
std/collections/index.html:350: broken link - `std/collections/mod.hash_map.html`
std/collections/index.html:350: broken link - `std/collections/mod.hash_set.html`
std/collections/index.html:350: broken link - `std/collections/mod.linked_list.html`
std/collections/index.html:350: broken link - `std/collections/mod.vec_deque.html`
std/os/unix/index.html:20: broken link - `std/os/unix/mod.ffi.html`
std/os/unix/index.html:20: broken link - `std/os/unix/mod.fs.html`
std/os/unix/index.html:20: broken link - `std/os/unix/mod.io.html`
std/os/unix/index.html:20: broken link - `std/os/unix/mod.net.html`
std/os/unix/index.html:20: broken link - `std/os/unix/mod.prelude.html`
std/os/unix/index.html:20: broken link - `std/os/unix/mod.process.html`
std/os/unix/index.html:20: broken link - `std/os/unix/mod.raw.html`
std/os/unix/index.html:20: broken link - `std/os/unix/mod.thread.html`
std/os/darwin/index.html:15: broken link - `std/os/darwin/mod.fs.html`
std/os/darwin/index.html:15: broken link - `std/os/darwin/mod.objc.html`
std/os/index.html:2: broken link - `std/os/mod.darwin.html`
std/os/index.html:2: broken link - `std/os/mod.fd.html`
std/os/index.html:2: broken link - `std/os/mod.linux.html`
std/os/index.html:2: broken link - `std/os/mod.raw.html`
std/os/index.html:2: broken link - `std/os/mod.unix.html`
std/os/index.html:2: broken link - `std/os/mod.wasi.html`
std/os/index.html:2: broken link - `std/os/mod.wasip2.html`
std/os/index.html:2: broken link - `std/os/mod.windows.html`
std/os/linux/index.html:2: broken link - `std/os/linux/mod.fs.html`
std/os/linux/index.html:2: broken link - `std/os/linux/mod.net.html`
std/os/linux/index.html:2: broken link - `std/os/linux/mod.raw.html`
std/os/linux/index.html:2: broken link - `std/os/linux/mod.process.html`
std/os/wasi/index.html:20: broken link - `std/os/wasi/mod.ffi.html`
std/os/wasi/index.html:20: broken link - `std/os/wasi/mod.io.html`
std/os/wasi/index.html:20: broken link - `std/os/wasi/mod.prelude.html`
std/os/wasi/index.html:20: broken link - `std/os/wasi/mod.fs.html`
std/os/windows/index.html:18: broken link - `std/os/windows/mod.ffi.html`
std/os/windows/index.html:18: broken link - `std/os/windows/mod.fs.html`
std/os/windows/index.html:18: broken link - `std/os/windows/mod.io.html`
std/os/windows/index.html:18: broken link - `std/os/windows/mod.prelude.html`
std/os/windows/index.html:18: broken link - `std/os/windows/mod.process.html`
std/os/windows/index.html:18: broken link - `std/os/windows/mod.raw.html`
std/os/windows/index.html:18: broken link - `std/os/windows/mod.thread.html`
std/os/windows/index.html:18: broken link - `std/os/windows/mod.net.html`
std/range/index.html:13: broken link - `std/range/mod.legacy.html`
std/f64/index.html:8: broken link - `std/f64/mod.consts.html`
std/simd/index.html:25: broken link - `std/simd/mod.cmp.html`
std/simd/index.html:25: broken link - `std/simd/mod.num.html`
std/simd/index.html:25: broken link - `std/simd/mod.prelude.html`
std/simd/index.html:25: broken link - `std/simd/mod.ptr.html`
std/prelude/index.html:71: broken link - `std/prelude/mod.rust_2015.html`
std/prelude/index.html:71: broken link - `std/prelude/mod.rust_2018.html`
std/prelude/index.html:71: broken link - `std/prelude/mod.rust_2021.html`
std/prelude/index.html:71: broken link - `std/prelude/mod.rust_2024.html`
std/prelude/index.html:71: broken link - `std/prelude/mod.v1.html`
std/ffi/index.html:136: broken link - `std/ffi/mod.c_str.html`
std/ffi/index.html:136: broken link - `std/ffi/mod.os_str.html`
std/f16/index.html:4: broken link - `std/f16/mod.consts.html`
std/f128/index.html:4: broken link - `std/f128/mod.consts.html`
std/f32/index.html:8: broken link - `std/f32/mod.consts.html`
std/str/index.html:3: broken link - `std/str/mod.pattern.html`
std/mem/index.html:29: broken link - `std/mem/mod.type_info.html`
std/io/index.html:225: broken link - `std/io/mod.prelude.html`
std/intrinsics/index.html:35: broken link - `std/intrinsics/mod.fallback.html`
std/intrinsics/index.html:35: broken link - `std/intrinsics/mod.gpu.html`
std/intrinsics/index.html:35: broken link - `std/intrinsics/mod.mir.html`
std/intrinsics/index.html:35: broken link - `std/intrinsics/mod.simd.html`
std/intrinsics/simd/index.html:3: broken link - `std/intrinsics/simd/mod.scalable.html`
std/sync/index.html:152: broken link - `std/sync/mod.atomic.html`
std/sync/index.html:152: broken link - `std/sync/mod.mpsc.html`
std/sync/index.html:152: broken link - `std/sync/mod.mpmc.html`
std/sync/index.html:152: broken link - `std/sync/mod.nonpoison.html`
std/sync/index.html:152: broken link - `std/sync/mod.oneshot.html`
std/sync/index.html:152: broken link - `std/sync/mod.poison.html`
core/index.html:43: broken link - `core/mod.alloc.html`
core/index.html:43: broken link - `core/mod.any.html`
core/index.html:43: broken link - `core/mod.arch.html`
core/index.html:43: broken link - `core/mod.array.html`
core/index.html:43: broken link - `core/mod.ascii.html`
core/index.html:43: broken link - `core/mod.borrow.html`
core/index.html:43: broken link - `core/mod.cell.html`
core/index.html:43: broken link - `core/mod.char.html`
core/index.html:43: broken link - `core/mod.clone.html`
core/index.html:43: broken link - `core/mod.cmp.html`
core/index.html:43: broken link - `core/mod.convert.html`
core/index.html:43: broken link - `core/mod.default.html`
core/index.html:43: broken link - `core/mod.error.html`
core/index.html:43: broken link - `core/mod.f32.html`
core/index.html:43: broken link - `core/mod.f64.html`
core/index.html:43: broken link - `core/mod.ffi.html`
core/index.html:43: broken link - `core/mod.fmt.html`
core/index.html:43: broken link - `core/mod.future.html`
core/index.html:43: broken link - `core/mod.hash.html`
core/index.html:43: broken link - `core/mod.hint.html`
core/index.html:43: broken link - `core/mod.i8.html`
core/index.html:43: broken link - `core/mod.i16.html`
core/index.html:43: broken link - `core/mod.i32.html`
core/index.html:43: broken link - `core/mod.i64.html`
core/index.html:43: broken link - `core/mod.i128.html`
core/index.html:43: broken link - `core/mod.isize.html`
core/index.html:43: broken link - `core/mod.iter.html`
core/index.html:43: broken link - `core/mod.marker.html`
core/index.html:43: broken link - `core/mod.mem.html`
core/index.html:43: broken link - `core/mod.net.html`
core/index.html:43: broken link - `core/mod.num.html`
core/index.html:43: broken link - `core/mod.ops.html`
core/index.html:43: broken link - `core/mod.option.html`
core/index.html:43: broken link - `core/mod.panic.html`
core/index.html:43: broken link - `core/mod.pin.html`
core/index.html:43: broken link - `core/mod.prelude.html`
core/index.html:43: broken link - `core/mod.primitive.html`
core/index.html:44: broken link - `core/mod.ptr.html`
core/index.html:44: broken link - `core/mod.range.html`
core/index.html:44: broken link - `core/mod.result.html`
core/index.html:44: broken link - `core/mod.slice.html`
core/index.html:44: broken link - `core/mod.str.html`
core/index.html:44: broken link - `core/mod.sync.html`
core/index.html:44: broken link - `core/mod.task.html`
core/index.html:44: broken link - `core/mod.time.html`
core/index.html:44: broken link - `core/mod.u8.html`
core/index.html:44: broken link - `core/mod.u16.html`
core/index.html:44: broken link - `core/mod.u32.html`
core/index.html:44: broken link - `core/mod.u64.html`
core/index.html:44: broken link - `core/mod.u128.html`
core/index.html:44: broken link - `core/mod.usize.html`
core/index.html:44: broken link - `core/mod.async_iter.html`
core/index.html:44: broken link - `core/mod.autodiff.html`
core/index.html:46: broken link - `core/mod.bstr.html`
core/index.html:46: broken link - `core/mod.contracts.html`
core/index.html:46: broken link - `core/mod.f16.html`
core/index.html:46: broken link - `core/mod.f128.html`
core/index.html:46: broken link - `core/mod.field.html`
core/index.html:46: broken link - `core/mod.from.html`
core/index.html:46: broken link - `core/mod.index.html`
core/index.html:46: broken link - `core/mod.intrinsics.html`
core/index.html:46: broken link - `core/mod.io.html`
core/index.html:46: broken link - `core/mod.os.html`
core/index.html:46: broken link - `core/mod.panicking.html`
core/index.html:46: broken link - `core/mod.pat.html`
core/index.html:46: broken link - `core/mod.process.html`
core/index.html:46: broken link - `core/mod.profiling.html`
core/index.html:46: broken link - `core/mod.random.html`
core/index.html:46: broken link - `core/mod.simd.html`
core/index.html:46: broken link - `core/mod.ub_checks.html`
core/index.html:47: broken link - `core/mod.unsafe_binder.html`
core/os/darwin/index.html:15: broken link - `core/os/darwin/mod.objc.html`
core/os/index.html:2: broken link - `core/os/mod.darwin.html`
core/panicking/index.html:17: broken link - `core/panicking/mod.panic_const.html`
core/range/index.html:13: broken link - `core/range/mod.legacy.html`
core/f64/index.html:8: broken link - `core/f64/mod.consts.html`
core/f64/index.html:8: broken link - `core/f64/mod.math.html`
core/simd/index.html:25: broken link - `core/simd/mod.cmp.html`
core/simd/index.html:25: broken link - `core/simd/mod.num.html`
core/simd/index.html:25: broken link - `core/simd/mod.prelude.html`
core/simd/index.html:25: broken link - `core/simd/mod.ptr.html`
core/prelude/index.html:5: broken link - `core/prelude/mod.rust_2015.html`
core/prelude/index.html:5: broken link - `core/prelude/mod.rust_2018.html`
core/prelude/index.html:5: broken link - `core/prelude/mod.rust_2021.html`
core/prelude/index.html:5: broken link - `core/prelude/mod.rust_2024.html`
core/prelude/index.html:5: broken link - `core/prelude/mod.v1.html`
core/ffi/index.html:7: broken link - `core/ffi/mod.c_str.html`
core/ffi/index.html:7: broken link - `core/ffi/mod.va_list.html`
core/f16/index.html:8: broken link - `core/f16/mod.consts.html`
core/f128/index.html:8: broken link - `core/f128/mod.consts.html`
core/f32/index.html:8: broken link - `core/f32/mod.consts.html`
core/f32/index.html:8: broken link - `core/f32/mod.math.html`
core/str/index.html:3: broken link - `core/str/mod.pattern.html`
core/mem/index.html:29: broken link - `core/mem/mod.type_info.html`
core/arch/hexagon/index.html:5: broken link - `core/arch/hexagon/mod.v64.html`
core/arch/hexagon/index.html:6: broken link - `core/arch/hexagon/mod.v128.html`
core/arch/index.html:295: broken link - `core/arch/mod.aarch64.html`
core/arch/index.html:295: broken link - `core/arch/mod.wasm32.html`
core/arch/index.html:295: broken link - `core/arch/mod.x86.html`
core/arch/index.html:295: broken link - `core/arch/mod.x86_64.html`
core/arch/index.html:295: broken link - `core/arch/mod.amdgpu.html`
core/arch/index.html:295: broken link - `core/arch/mod.arm.html`
core/arch/index.html:295: broken link - `core/arch/mod.hexagon.html`
core/arch/index.html:295: broken link - `core/arch/mod.loongarch32.html`
core/arch/index.html:295: broken link - `core/arch/mod.loongarch64.html`
core/arch/index.html:295: broken link - `core/arch/mod.mips.html`
core/arch/index.html:295: broken link - `core/arch/mod.mips64.html`
core/arch/index.html:295: broken link - `core/arch/mod.nvptx.html`
core/arch/index.html:295: broken link - `core/arch/mod.powerpc.html`
core/arch/index.html:295: broken link - `core/arch/mod.powerpc64.html`
core/arch/index.html:295: broken link - `core/arch/mod.riscv32.html`
core/arch/index.html:295: broken link - `core/arch/mod.riscv64.html`
core/arch/index.html:295: broken link - `core/arch/mod.s390x.html`
core/arch/index.html:295: broken link - `core/arch/mod.wasm.html`
core/arch/index.html:295: broken link - `core/arch/mod.wasm64.html`
core/intrinsics/index.html:35: broken link - `core/intrinsics/mod.fallback.html`
core/intrinsics/index.html:35: broken link - `core/intrinsics/mod.gpu.html`
core/intrinsics/index.html:35: broken link - `core/intrinsics/mod.mir.html`
core/intrinsics/index.html:35: broken link - `core/intrinsics/mod.simd.html`
core/intrinsics/simd/index.html:3: broken link - `core/intrinsics/simd/mod.scalable.html`
core/sync/index.html:2: broken link - `core/sync/mod.atomic.html`
alloc/index.html:37: broken link - `alloc/mod.alloc.html`
alloc/index.html:37: broken link - `alloc/mod.borrow.html`
alloc/index.html:37: broken link - `alloc/mod.boxed.html`
alloc/index.html:37: broken link - `alloc/mod.collections.html`
alloc/index.html:37: broken link - `alloc/mod.ffi.html`
alloc/index.html:37: broken link - `alloc/mod.fmt.html`
alloc/index.html:37: broken link - `alloc/mod.rc.html`
alloc/index.html:38: broken link - `alloc/mod.slice.html`
alloc/index.html:38: broken link - `alloc/mod.str.html`
alloc/index.html:38: broken link - `alloc/mod.string.html`
alloc/index.html:38: broken link - `alloc/mod.sync.html`
alloc/index.html:38: broken link - `alloc/mod.task.html`
alloc/index.html:38: broken link - `alloc/mod.vec.html`
alloc/index.html:39: broken link - `alloc/mod.bstr.html`
alloc/index.html:39: broken link - `alloc/mod.intrinsics.html`
alloc/collections/index.html:2: broken link - `alloc/collections/mod.binary_heap.html`
alloc/collections/index.html:2: broken link - `alloc/collections/mod.btree_map.html`
alloc/collections/index.html:2: broken link - `alloc/collections/mod.btree_set.html`
alloc/collections/index.html:2: broken link - `alloc/collections/mod.linked_list.html`
alloc/collections/index.html:2: broken link - `alloc/collections/mod.vec_deque.html`
alloc/ffi/index.html:81: broken link - `alloc/ffi/mod.c_str.html`
alloc/str/index.html:3: broken link - `alloc/str/mod.pattern.html`
checked links in: 25.9s
number of HTML files scanned: 60296
number of HTML redirects found: 21247
number of links checked: 2881988
number of links ignored due to external: 150644
number of links ignored due to exceptions: 24
number of intra doc links ignored: 9
errors found: 296
found some broken links
NOTE: if you are adding or renaming a markdown file in a mdBook, don't forget to register the page in SUMMARY.md
Bootstrap failed while executing `--stage 2 test --skip tidy --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`
Command `/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools-bin/linkchecker /checkout/obj/build/aarch64-unknown-linux-gnu/doc` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:1618:23
Executed at: src/bootstrap/src/core/build_steps/test.rs:191:77

---
   2: <std::backtrace::Backtrace>::create
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/backtrace.rs:331:13
   3: <bootstrap::utils::exec::DeferredCommand>::finish_process
             at /checkout/src/bootstrap/src/utils/exec.rs:939:17
   4: <bootstrap::utils::exec::DeferredCommand>::wait_for_output::<&bootstrap::utils::exec::ExecutionContext>
             at /checkout/src/bootstrap/src/utils/exec.rs:831:21
   5: <bootstrap::utils::exec::ExecutionContext>::run
             at /checkout/src/bootstrap/src/utils/exec.rs:741:45
   6: <bootstrap::utils::exec::BootstrapCommand>::run::<&bootstrap::core::builder::Builder>
             at /checkout/src/bootstrap/src/utils/exec.rs:339:27
   7: <bootstrap::core::build_steps::test::Linkcheck as bootstrap::core::builder::Step>::run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:191:77
   8: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::test::Linkcheck>
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1579:36
   9: <bootstrap::core::build_steps::test::Linkcheck as bootstrap::core::builder::Step>::make_run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:137:21
  10: <bootstrap::core::builder::StepDescription>::maybe_run
             at /checkout/src/bootstrap/src/core/builder/mod.rs:476:13
  11: bootstrap::core::builder::cli_paths::match_paths_to_steps_and_run
             at /checkout/src/bootstrap/src/core/builder/cli_paths.rs:141:22
  12: <bootstrap::core::builder::Builder>::run_step_descriptions
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1122:9
  13: <bootstrap::core::builder::Builder>::execute_cli
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1101:14
  14: <bootstrap::Build>::build
             at /checkout/src/bootstrap/src/lib.rs:799:25
  15: bootstrap::main
             at /checkout/src/bootstrap/src/bin/main.rs:130:11
  16: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/ops/function.rs:250:5
  17: std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/sys/backtrace.rs:166:18
  18: std::rt::lang_start::<()>::{closure#0}
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/rt.rs:206:18
  19: <&dyn core::ops::function::Fn<(), Output = i32> + core::panic::unwind_safe::RefUnwindSafe + core::marker::Sync as core::ops::function::FnOnce<()>>::call_once
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/ops/function.rs:287:21
  20: std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<(), Output = i32> + core::panic::unwind_safe::RefUnwindSafe + core::marker::Sync, i32>
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:581:40
  21: std::panicking::catch_unwind::<i32, &dyn core::ops::function::Fn<(), Output = i32> + core::panic::unwind_safe::RefUnwindSafe + core::marker::Sync>
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:544:19
  22: std::panic::catch_unwind::<&dyn core::ops::function::Fn<(), Output = i32> + core::panic::unwind_safe::RefUnwindSafe + core::marker::Sync, i32>
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panic.rs:359:14
  23: std::rt::lang_start_internal::{closure#0}
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/rt.rs:175:24
  24: std::panicking::catch_unwind::do_call::<std::rt::lang_start_internal::{closure#0}, isize>
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:581:40
---
  31: __libc_start_main
  32: _start


Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:39:00
  local time: Fri Apr 24 02:09:39 UTC 2026
  network time: Fri, 24 Apr 2026 02:09:39 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 24, 2026

☔ The latest upstream changes (presumably #155745) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants