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

fix doc path in std::fmt macro #137538

Merged
merged 1 commit into from
Mar 16, 2025
Merged

Conversation

tapanprakasht
Copy link
Contributor

fixes #137519

@rustbot
Copy link
Collaborator

rustbot commented Feb 24, 2025

r? @thomcc

rustbot has assigned @thomcc.
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

@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 Feb 24, 2025
@rust-log-analyzer

This comment has been minimized.

@@ -106,7 +106,7 @@ macro_rules! print {
/// Use `println!` only for the primary output of your program. Use
/// [`eprintln!`] instead to print error and progress messages.
///
/// See [the formatting documentation in `std::fmt`](../std/fmt/index.html)
/// See [the formatting documentation in `std::fmt`](../fmt/index.html)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would make it point to https://doc.rust-lang.org/nightly/fmt/index.html, which is not valid. The current code works fine in the rustdoc generated html. I think rust-analyzer will need to be changed to correctly handle this link instead.

@Sky9x
Copy link
Contributor

Sky9x commented Feb 24, 2025

why is this using an html link in the first place? is there a reason you can't just link directly (ie. [abc](crate::fmt))?

@bjorn3
Copy link
Member

bjorn3 commented Feb 24, 2025

It was likely written before rustdoc supported linking to items.

@tapanprakasht
Copy link
Contributor Author

@bjorn3 I have updated the links without using the direct html. I see using crate::fmt format finally linking it to https://doc.rust-lang.org/nightly/alloc/fmt/index.html. Is that okay?

@thomcc
Copy link
Member

thomcc commented Feb 28, 2025

This looks good to me. To confirm, you've tested and it works (I don't see a reason that it wouldn't, but wish to make sure).

@tapanprakasht
Copy link
Contributor Author

tapanprakasht commented Feb 28, 2025

This looks good to me. To confirm, you've tested and it works (I don't see a reason that it wouldn't, but wish to make sure).

Yes. It works.

@thomcc
Copy link
Member

thomcc commented Mar 16, 2025

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 16, 2025

📌 Commit f63981e has been approved by thomcc

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 Mar 16, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 16, 2025
Rollup of 4 pull requests

Successful merges:

 - rust-lang#135080 (core: Make `Debug` impl of raw pointers print metadata if present)
 - rust-lang#137492 (libstd: rustdoc: correct note on fds 0/1/2 pre-main)
 - rust-lang#137538 (fix doc path in std::fmt macro)
 - rust-lang#138549 (Fix the OperandRef type for NullOp::{UbChecks,ContractChecks})

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c29a29e into rust-lang:master Mar 16, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 16, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 16, 2025
Rollup merge of rust-lang#137538 - tapanprakasht:fix-doc-path, r=thomcc

fix doc path in std::fmt macro

fixes rust-lang#137519
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Mar 19, 2025
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.

Broken doc links for standard library formatting macros
7 participants