Skip to content

Fix doc link to Instant sub in saturating caveat#157703

Open
orlp wants to merge 1 commit into
rust-lang:mainfrom
orlp:fix-instant-comment
Open

Fix doc link to Instant sub in saturating caveat#157703
orlp wants to merge 1 commit into
rust-lang:mainfrom
orlp:fix-instant-comment

Conversation

@orlp

@orlp orlp commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The sub link in the caveat about saturating subtraction for Instant was linking to the wrong implementation of sub. On https://doc.rust-lang.org/std/time/struct.Instant.html it was linking to Instant - Duration which in fact is not saturating, and will panic. It should link to Instant - Instant.

@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 10, 2026
@rustbot

rustbot commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

r? @LawnGnome

rustbot has assigned @LawnGnome.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 11 candidates
  • Random selection from LawnGnome, Mark-Simulacrum, clarfonthey, jhpratt

@SimonSapin

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 6a0f2d4 has been approved by SimonSapin

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

@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 10, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 10, 2026
…apin

Fix doc link to Instant sub in saturating caveat

The `sub` link in the caveat about saturating subtraction for `Instant` was linking to the wrong implementation of `sub`. On https://doc.rust-lang.org/std/time/struct.Instant.html it was linking to `Instant - Duration` which in fact *is not saturating*, and *will* panic. It should link to `Instant - Instant`.
rust-bors Bot pushed a commit that referenced this pull request Jun 10, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty)
 - #157282 (Fix post-monomorphization error note race in the parallel frontend)
 - #157352 (Make the retained dep graph deterministic under the parallel frontend)
 - #157601 (Emit error for unused target expression in glob and list delegations)
 - #157626 (Autogenerate unstable compiler flag stubs for unstable-book)
 - #157647 (Start using comptime for reflection intrinsics and their wrapper functions)
 - #157013 (Ensure inferred let pattern types are well-formed)
 - #157288 (platform support: add SNaN erratum to MIPS targets)
 - #157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs)
 - #157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust …)
 - #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
 - #157691 (Move symbol hiding code to a new file)
 - #157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N))
 - #157703 (Fix doc link to Instant sub in saturating caveat)

Failed merges:

 - #157699 (Arg splat experiment - hir FnDecl impl)
rust-bors Bot pushed a commit that referenced this pull request Jun 10, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #157280 (traits: Allow escaping self types in ExistentialTraitRef::with_self_ty)
 - #157282 (Fix post-monomorphization error note race in the parallel frontend)
 - #157352 (Make the retained dep graph deterministic under the parallel frontend)
 - #157601 (Emit error for unused target expression in glob and list delegations)
 - #157626 (Autogenerate unstable compiler flag stubs for unstable-book)
 - #157647 (Start using comptime for reflection intrinsics and their wrapper functions)
 - #157013 (Ensure inferred let pattern types are well-formed)
 - #157288 (platform support: add SNaN erratum to MIPS targets)
 - #157355 (Add `or_try_*` variants for `HashMap` and `BTreeMap` Entry APIs)
 - #157577 (Fix parser error recovery treating 'dyn' as a strict keyword in Rust …)
 - #157670 (Rename `errors.rs` file to `diagnostics.rs` (4/N))
 - #157691 (Move symbol hiding code to a new file)
 - #157700 (Rename `errors.rs` file to `diagnostics.rs` (5/N))
 - #157703 (Fix doc link to Instant sub in saturating caveat)

Failed merges:

 - #157699 (Arg splat experiment - hir FnDecl impl)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 10, 2026
…apin

Fix doc link to Instant sub in saturating caveat

The `sub` link in the caveat about saturating subtraction for `Instant` was linking to the wrong implementation of `sub`. On https://doc.rust-lang.org/std/time/struct.Instant.html it was linking to `Instant - Duration` which in fact *is not saturating*, and *will* panic. It should link to `Instant - Instant`.
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 10, 2026
…apin

Fix doc link to Instant sub in saturating caveat

The `sub` link in the caveat about saturating subtraction for `Instant` was linking to the wrong implementation of `sub`. On https://doc.rust-lang.org/std/time/struct.Instant.html it was linking to `Instant - Duration` which in fact *is not saturating*, and *will* panic. It should link to `Instant - Instant`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants