Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 6 pull requests #128311

Closed
wants to merge 16 commits into from

Commits on Jul 18, 2024

  1. Add copy code button

    GuillaumeGomez committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    9946a68 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ddaa90f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    578810b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    26d7251 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. Configuration menu
    Copy the full SHA
    aded725 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2024

  1. Fix doc nits

    Many tiny changes to stdlib doc comments to make them consistent (for example
    "Returns foo", rather than "Return foo", per RFC1574), adding missing periods, paragraph
    breaks, backticks for monospace style, and other minor nits.
    
    https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
    bitfield committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    a19472a View commit details
    Browse the repository at this point in the history
  2. Add links from assert_eq! docs to debug_assert_eq!, etc.

    This adds information and links from the docs for the following macros to their debug-only versions:
    
    * `assert_eq!`
    * `assert_ne!`
    * `assert_matches!`
    
    This matches the existing documentation for the `assert!` macro.
    mbrubeck committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    1c64fd3 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2024

  1. stabilize const_waker

    slanterns committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    0a6ebba View commit details
    Browse the repository at this point in the history
  2. Remove spurious backticks detected by rustdoc::unescaped_backticks

    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    ojeda committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    1b56d02 View commit details
    Browse the repository at this point in the history
  3. Warn on rustdoc::unescaped_backticks for `core/alloc/std/test/proc_…

    …macro`
    
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    ojeda committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    c77d2ca View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#125779 - GuillaumeGomez:copy-code, r=rustdo…

    …c-team
    
    [rustdoc] Add copy code feature
    
    This PR adds a "copy code" to code blocks. Since this is a JS only feature, the HTML is generated with JS when the user hovers the code block to prevent generating DOM unless needed.
    
    Two things to note:
     1. I voluntarily kept the current behaviour of the run button (only when hovering a code block with a mouse) so it doesn't do anything on mobile. I plan to send a follow-up where the buttons would "expandable" or something. Still need to think which approach would be the best.
     2. I used a picture and not text like the run button to remain consistent with the "copy path" button. I'd also prefer for the run button to use a picture (like what is used in mdbook) but again, that's something to be discussed later on.
    
    The rendering looks like this:
    
    ![Screenshot from 2024-06-03 21-29-48](https://github.com/rust-lang/rust/assets/3050060/a0b18f9c-b3dd-4a65-89a7-5a7a303b5c2b)
    ![Screenshot from 2024-06-03 21-30-20](https://github.com/rust-lang/rust/assets/3050060/b3b084ff-2716-4160-820b-d4774681a961)
    
    It can be tested [here](https://guillaume-gomez.fr/rustdoc/bar/struct.Bar.html) (without the run button) and [here](https://guillaume-gomez.fr/rustdoc/foo/struct.Bar.html) (with the run button).
    
    Fixes rust-lang#86851.
    
    r? `@notriddle`
    GuillaumeGomez authored Jul 28, 2024
    Configuration menu
    Copy the full SHA
    a38861f View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#127765 - bitfield:fix_stdlib_doc_nits, r=dt…

    …olnay
    
    Fix doc nits
    
    Many tiny changes to stdlib doc comments to make them consistent (for example "Returns foo", rather than "Return foo"), adding missing periods, paragraph breaks, backticks for monospace style, and other minor nits.
    GuillaumeGomez authored Jul 28, 2024
    Configuration menu
    Copy the full SHA
    15b864d View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#128103 - folkertdev:unsigned-int-is-multipl…

    …e-of, r=Amanieu
    
    add `is_multiple_of` for unsigned integer types
    
    tracking issue: rust-lang#128101
    
    This adds the `.is_multiple_of` method on unsigned integers.
    
    Returns `true` if `self` is an integer multiple of `rhs`, and false otherwise.
    
    This function is equivalent to `self % rhs == 0`, except that it will not panic for `rhs == 0`. Instead, `0.is_multiple_of(0) == true`, and for any non-zero `n`, `n.is_multiple_of(0) == false`.
    GuillaumeGomez authored Jul 28, 2024
    Configuration menu
    Copy the full SHA
    ff59e54 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#128228 - slanterns:const_waker, r=dtolnay,o…

    …li-obk
    
    Stabilize `const_waker`
    
    Closes: rust-lang#102012.
    
    For `local_waker` and `context_ext` related things, I just ~~moved them to dedicated feature gates and reused their own tracking issue (maybe it's better to open a new one later, but at least they should not be tracked under rust-lang#102012 from the beginning IMO.)~~ reused their own feature gates as suggested by `@tgross35.`
    
    `@rustbot` label: +T-libs-api
    
    r? libs-api
    GuillaumeGomez authored Jul 28, 2024
    Configuration menu
    Copy the full SHA
    d4326b2 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#128240 - mbrubeck:patch-3, r=joboet

    Add links from `assert_eq!` docs to `debug_assert_eq!`, etc.
    
    This adds information and links from the docs for the following macros to their debug-only versions:
    
    * `assert_eq!`
    * `assert_ne!`
    * `assert_matches!`
    
    This matches the existing documentation for the `assert!` macro.
    GuillaumeGomez authored Jul 28, 2024
    Configuration menu
    Copy the full SHA
    46f58aa View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#128307 - ojeda:unescaped_backticks, r=Guill…

    …aumeGomez
    
    Clean and enable `rustdoc::unescaped_backticks` for `core/alloc/std/test/proc_macro`
    
    I am not sure if the lint is supposed to be "ready enough" (since it is `allow` by default), but it does catch a couple issues in `core` (`alloc`, `std`, `test` and `proc_macro` are already clean), so I propose making it `warn` in all the crates rendered in the website.
    
    Cc: `@GuillaumeGomez`
    GuillaumeGomez authored Jul 28, 2024
    Configuration menu
    Copy the full SHA
    cc96bda View commit details
    Browse the repository at this point in the history