Skip to content

Move attribute and keyword docs from std to core#158327

Open
jschillem wants to merge 7 commits into
rust-lang:mainfrom
jschillem:docs-move-attributes-and-keywords-to-core
Open

Move attribute and keyword docs from std to core#158327
jschillem wants to merge 7 commits into
rust-lang:mainfrom
jschillem:docs-move-attributes-and-keywords-to-core

Conversation

@jschillem

@jschillem jschillem commented Jun 23, 2026

Copy link
Copy Markdown

View all comments

Move the documentation for attributes and keywords into the core crate. Apart from strictly moving the module, I had to make a few small changes to certain docs to avoid using std types when possible, as well as fixing a few suggestions related to linking to primitives.

Pre-requisite for work on #157604.

r? @GuillaumeGomez

Verified documentation using:
./x doc library/core and ./x doc library/std, as well as running doc-tests for both crates.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 23, 2026
@rustbot

rustbot commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@GuillaumeGomez

Copy link
Copy Markdown
Member

Thanks!

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit e5d79ed has been approved by GuillaumeGomez

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 24, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 25, 2026
…-keywords-to-core, r=GuillaumeGomez

Move attribute and keyword docs from `std` to `core`

Move the documentation for attributes and keywords into the `core` crate. Apart from strictly moving the module, I had to make a few small changes to certain docs to avoid using `std` types when possible, as well as fixing a few suggestions related to linking to primitives.

Pre-requisite for work on rust-lang#157604.

r? @GuillaumeGomez

Verified documentation using:
`./x doc library/core` and `./x doc library/std`, as well as running doc-tests for both crates.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 25, 2026
…-keywords-to-core, r=GuillaumeGomez

Move attribute and keyword docs from `std` to `core`

Move the documentation for attributes and keywords into the `core` crate. Apart from strictly moving the module, I had to make a few small changes to certain docs to avoid using `std` types when possible, as well as fixing a few suggestions related to linking to primitives.

Pre-requisite for work on rust-lang#157604.

r? @GuillaumeGomez

Verified documentation using:
`./x doc library/core` and `./x doc library/std`, as well as running doc-tests for both crates.
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

💔 I suspect this PR failed tests as part of a rollup
@bors r-

After fixing the problem, consider running a try job for the failed job before re-approving.

Link to failure: #158389 (comment)

@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 25, 2026
@rust-bors

rust-bors Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#158389), which was unapproved.

View changes since this unapproval

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot rustbot added the has-merge-commits PR has merge commits, merge with caution. label Jun 25, 2026
@jschillem jschillem force-pushed the docs-move-attributes-and-keywords-to-core branch from 2ce02ed to 8230837 Compare June 25, 2026 13:16
@rustbot rustbot removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. has-merge-commits PR has merge commits, merge with caution. labels Jun 25, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member

@bors try job=test-various

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 25, 2026
…o-core, r=<try>

Move attribute and keyword docs from `std` to `core`


try-job: test-various
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 25, 2026
@rust-bors

rust-bors Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 6850d53 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@jschillem: 🔑 Insufficient privileges: not in try users

@jieyouxu jieyouxu removed T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. A-meta Area: Issues & PRs about the rust-lang/rust repository itself PG-exploit-mitigations Project group: Exploit mitigations WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) A-CI Area: Our Github Actions CI T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-clippy Relevant to the Clippy team. labels Jun 26, 2026
Comment thread library/core/src/keyword_docs.rs Outdated
Comment thread library/core/src/keyword_docs.rs Outdated
Comment thread library/std/src/lib.rs
@rust-bors

This comment has been minimized.

@jschillem jschillem force-pushed the docs-move-attributes-and-keywords-to-core branch from 8e77041 to a40f3d5 Compare June 27, 2026 16:43
@rustbot

rustbot commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

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.

Comment thread library/std/src/lib.rs Outdated
@jschillem

jschillem commented Jun 27, 2026

Copy link
Copy Markdown
Author

@GuillaumeGomez could you run a test-various try job to test if the ignore fixes the CI fail case?

@GuillaumeGomez

Copy link
Copy Markdown
Member

@bors try job=test-various

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 28, 2026
…o-core, r=<try>

Move attribute and keyword docs from `std` to `core`


try-job: test-various
@rust-bors rust-bors Bot 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 Jun 28, 2026
@rust-bors

rust-bors Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

💔 Test for ac98aae failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-various failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Error: failed to run main module `/tmp/rustdoctestp6PcME/rust_out.wasm`

Caused by:
    0: failed to invoke command default
    1: error while executing at wasm backtrace:
    0: 0x3ab71c - rust_out.wasm!abort
    1: 0x3a63ac - rust_out.wasm!std[508e352727b3161f]::sys::pal::wasi::abort_internal
    2: 0x3a1940 - rust_out.wasm!std[508e352727b3161f]::process::abort
    3: 0x3a1fb8 - rust_out.wasm!__rustc[b8e24a6cafe7eb96]::__rust_abort
    4: 0x39f88a - rust_out.wasm!__rustc[b8e24a6cafe7eb96]::__rust_start_panic
    5: 0x3a1dfd - rust_out.wasm!__rustc[b8e24a6cafe7eb96]::rust_panic
    6: 0x3a0f59 - rust_out.wasm!std[508e352727b3161f]::panicking::panic_with_hook
    7: 0x3a0a6f - rust_out.wasm!std[508e352727b3161f]::panicking::panic_handler::{closure#0}
    8: 0x3a09d7 - rust_out.wasm!std[508e352727b3161f]::sys::backtrace::__rust_end_short_backtrace::<std[508e352727b3161f]::panicking::panic_handler::{closure#0}, !>
    9: 0x3a209b - rust_out.wasm!__rustc[b8e24a6cafe7eb96]::rust_begin_unwind
   10: 0x3b7581 - rust_out.wasm!core[281a2d11d482b328]::panicking::panic_fmt
   11: 0x3bf6df - rust_out.wasm!core[281a2d11d482b328]::result::unwrap_failed
   12: 0x1734e6 - rust_out.wasm!std[508e352727b3161f]::thread::functions::spawn::<doctest_bundle_2024[c2d9bd4b5f78a61c]::__doctest_765::main::{closure#0}, ()>
   13: 0x247615 - rust_out.wasm!doctest_bundle_2024[c2d9bd4b5f78a61c]::__doctest_765::main
   14: 0x2476b5 - rust_out.wasm!doctest_bundle_2024[c2d9bd4b5f78a61c]::__doctest_765::__main_fn
   15:  0x26cf4 - rust_out.wasm!doctest_runner_2024[d5df16d6a4834114]::__doctest_765::TEST::{closure#0}
   16:  0xe7370 - rust_out.wasm!<doctest_runner_2024[d5df16d6a4834114]::__doctest_765::TEST::{closure#0} as core[281a2d11d482b328]::ops::function::FnOnce<()>>::call_once
   17: 0x36854b - rust_out.wasm!test[75a45de8939e731b]::__rust_begin_short_backtrace::<core[281a2d11d482b328]::result::Result<(), alloc[9ec18719d879f29c]::string::String>, fn() -> core[281a2d11d482b328]::result::Result<(), alloc[9ec18719d879f29c]::string::String>>
   18: 0x37fd00 - rust_out.wasm!<test[75a45de8939e731b]::types::RunnableTest>::run
   19: 0x3810a8 - rust_out.wasm!test[75a45de8939e731b]::run_test
note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information
    2: wasm trap: wasm `unreachable` instruction executed

Stack backtrace:
test library/core/src/iter/traits/iterator.rs - iter::traits::iterator::Iterator::for_each (line 868) ... ok
test library/core/src/iter/traits/iterator.rs - iter::traits::iterator::Iterator::fuse (line 1794) ... ok
test library/core/src/iter/traits/iterator.rs - iter::traits::iterator::Iterator::ge (line 4013) ... ok
---
test library/core/src/keyword_docs.rs - mod_keyword (line 1011) ... ok
test library/core/src/keyword_docs.rs - move_keyword (line 1039) ... ok
test library/core/src/keyword_docs.rs - move_keyword (line 1051) ... ok
   0: wasmtime_internal_core::error::backtrace::capture
   1: <wasmtime_internal_core::error::error::Error as core::convert::From<E>>::from
   2: wasmtime::runtime::trap::from_runtime_box
   3: wasmtime::runtime::vm::traphandlers::catch_traps
   4: wasmtime::runtime::func::Func::call_unchecked_raw
   5: wasmtime::runtime::func::Func::call_impl_do_call
   6: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
   7: wasmtime_internal_fiber::unix::fiber_start
   8: wasmtime_internal_fiber::stackswitch::x86_64::wasmtime_fiber_start
   9: wasmtime_internal_fiber::Fiber<Resume,Yield,Return>::resume
  10: wasmtime::runtime::fiber::resume_fiber
  11: <wasmtime::runtime::fiber::FiberFuture as core::future::future::Future>::poll
  12: wasmtime_cli::commands::run::RunCommand::load_main_module::{{closure}}
  13: wasmtime_cli::commands::run::RunCommand::instantiate_and_run::{{closure}}
  14: wasmtime_cli::commands::run::RunCommand::execute::{{closure}}
  15: tokio::runtime::park::CachedParkThread::block_on
  16: tokio::runtime::runtime::Runtime::block_on
  17: wasmtime_cli::commands::run::RunCommand::execute
  18: wasmtime::main
  19: std::sys::backtrace::__rust_begin_short_backtrace
  20: std::rt::lang_start::{{closure}}
  21: std::rt::lang_start_internal

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants