Skip to content

Add #[doc(alias = "phi")] for float GOLDEN_RATIO constants#156830

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
okaneco:phi_doc_alias
May 24, 2026
Merged

Add #[doc(alias = "phi")] for float GOLDEN_RATIO constants#156830
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
okaneco:phi_doc_alias

Conversation

@okaneco
Copy link
Copy Markdown
Contributor

@okaneco okaneco commented May 22, 2026

  • Adds "phi" doc alias for f16, f32, f64, and f128

I knew this constant was stabilized but I couldn't remember what it was called.
Searching "phi" in the docs only surfaces the π constant, is_ascii_graphic, and spin_loop_hint methods. This alias would make it much easier to find.
https://doc.rust-lang.org/nightly/std/?search=phi

@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 May 22, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 22, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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: libs
  • libs expanded to 7 candidates

@SimonSapin
Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 23, 2026

📌 Commit 3a6cb05 has been approved by SimonSapin

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 100. 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 May 23, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request May 23, 2026
Add `#[doc(alias = "phi")]` for float `GOLDEN_RATIO` constants

- Adds "phi" doc alias for `f16`, `f32`, `f64`, and `f128`

I knew this constant was stabilized but I couldn't remember what it was called.
Searching "phi" in the docs only surfaces the π constant, `is_ascii_graphic`, and `spin_loop_hint` methods. This alias would make it much easier to find.
https://doc.rust-lang.org/nightly/std/?search=phi
rust-bors Bot pushed a commit that referenced this pull request May 23, 2026
Rollup of 4 pull requests

Successful merges:

 - #156736 (Fix jump to def link generation on primitive type associated methods)
 - #156828 (Add unstable Share trait)
 - #156830 (Add `#[doc(alias = "phi")]` for float `GOLDEN_RATIO` constants)
 - #156860 (Fix Pieter-Louis Schoeman mailmap entry)
rust-bors Bot pushed a commit that referenced this pull request May 24, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #156769 (Use print instead of po in debuginfo path test)
 - #156784 (Fix reborrow_info early return skipping field validation)
 - #156827 (float_literal_f32_fallback: Don't suggest invalid code)
 - #156828 (Add unstable Share trait)
 - #156830 (Add `#[doc(alias = "phi")]` for float `GOLDEN_RATIO` constants)
 - #156860 (Fix Pieter-Louis Schoeman mailmap entry)
@rust-bors rust-bors Bot merged commit e8d2321 into rust-lang:main May 24, 2026
11 checks passed
@rustbot rustbot added this to the 1.98.0 milestone May 24, 2026
rust-timer added a commit that referenced this pull request May 24, 2026
Rollup merge of #156830 - okaneco:phi_doc_alias, r=SimonSapin

Add `#[doc(alias = "phi")]` for float `GOLDEN_RATIO` constants

- Adds "phi" doc alias for `f16`, `f32`, `f64`, and `f128`

I knew this constant was stabilized but I couldn't remember what it was called.
Searching "phi" in the docs only surfaces the π constant, `is_ascii_graphic`, and `spin_loop_hint` methods. This alias would make it much easier to find.
https://doc.rust-lang.org/nightly/std/?search=phi
@okaneco okaneco deleted the phi_doc_alias branch May 24, 2026 10:21
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