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

Add doc aliases for trigonometry and other f32,f64 methods. #114971

Merged
merged 1 commit into from
Aug 19, 2023

Conversation

kpreid
Copy link
Contributor

@kpreid kpreid commented Aug 18, 2023

These are common alternate names, usually a less-abbreviated form, for the operation; e.g. arctan instead of atan. Prompted by https://users.rust-lang.org/t/64-bit-trigonometry/98599

These are common alternate names, usually a less-abbreviated form,
for the operation; e.g. `arctan` instead of `atan`. Prompted by
<https://users.rust-lang.org/t/64-bit-trigonometry/98599>
@rustbot
Copy link
Collaborator

rustbot commented Aug 18, 2023

r? @joshtriplett

(rustbot has picked a reviewer for you, use r? to override)

@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 Aug 18, 2023
@Cyborus04
Copy link
Contributor

Is it possible to add multiple aliases? Could be good to add things like "arctangent" too

@kpreid
Copy link
Contributor Author

kpreid commented Aug 18, 2023

Is it possible to add multiple aliases?

Yes, that's supported (you can see an example in my other PR #114977).

Could be good to add things like "arctangent" too

I'm a little skeptical that that will be useful because AFAIK no other programming languages or notations use the unabbreviated names. I don't see a strong reason not to add them either, but they will enlarge the doc search index a bit more. Any third opinions out there?

@ChrisDenton
Copy link
Member

From the std dev guide:

We must have a reasonable expectation that people might search for the term in the documentation search.

I think, as you say, "arctangent" fails that test. At the very least I would expect that people would search for the short form first. And as the docs say, the point of the alias is to answer questions like: "what did Rust call mkdir?".

@joshtriplett
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 19, 2023

📌 Commit c353dbd has been approved by joshtriplett

It is now in the queue for this repository.

@bors bors 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 Aug 19, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 19, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#114953 (Add myself back to review rotation)
 - rust-lang#114958 (`ignore-cross-compile` on `optimization-remarks-dir-pgo` test)
 - rust-lang#114971 (Add doc aliases for trigonometry and other f32,f64 methods.)
 - rust-lang#114972 (Add a test to check that inline const is in required_consts)
 - rust-lang#114977 (Add `modulo` and `mod` as doc aliases for `rem_euclid`.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8d52b4d into rust-lang:master Aug 19, 2023
@rustbot rustbot added this to the 1.73.0 milestone Aug 19, 2023
@kpreid kpreid deleted the trig branch August 29, 2023 19:13
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.

6 participants