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 missing documentation for FileNameDisplayPreference variants #102860

Merged

Conversation

GuillaumeGomez
Copy link
Member

Took me a while to find the information when I needed it so hopefully it should save some time for the next ones.

r? @thomcc

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 9, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 9, 2022
@GuillaumeGomez GuillaumeGomez added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Oct 9, 2022
@thomcc
Copy link
Member

thomcc commented Oct 9, 2022

Hm, sorry, it looks fine, but I don't know about anything in compiler/ really so that's just a guess.

r? compiler

@rust-highfive rust-highfive assigned jackh726 and unassigned thomcc Oct 9, 2022
@GuillaumeGomez
Copy link
Member Author

Oh sorry, I assumed you were when you reviewed my previous PRs.

@nagisa
Copy link
Member

nagisa commented Oct 9, 2022

I don’t believe these are accurate descriptions of these variants. The purpose of this enum is to specify whether the path should be displayed taking into account --remap-path-prefix or the original pre-remapping input.

The resulting path can be absolute, or relative in either case (for Local IIRC it depends on how the path is passed to the compiler), and neither is guaranteed to be more preferable than the other.

How about this:

  • Remapped – Display the path after the application of rewrite rules provided via --remap-path-prefix. This is appropriate for paths that get embedded into files produced by the compiler.
  • Local – Display the path before the application of rewrite rules provided via --remap-path-prefix. This is appropriate for use in user-facing output (such as diagnostics.)

@GuillaumeGomez GuillaumeGomez force-pushed the missing-docs-FileNameDisplayPreference branch from 1bc0f68 to 550f579 Compare October 9, 2022 21:32
@GuillaumeGomez
Copy link
Member Author

Thanks for the clarification, it was very much needed! :) TIL

I updated the doc comments as you suggested.

@thomcc
Copy link
Member

thomcc commented Oct 9, 2022

Oh sorry, I assumed you were when you reviewed my previous PRs.

Those were all in library/* -- Totally happy to review that stuff :)

@nagisa
Copy link
Member

nagisa commented Oct 9, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Oct 9, 2022

📌 Commit 550f579 has been approved by nagisa

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 Oct 9, 2022
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 10, 2022
…meDisplayPreference, r=nagisa

Add missing documentation for FileNameDisplayPreference variants

Took me a while to find the information when I needed it so hopefully it should save some time for the next ones.

r? `@thomcc`
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 10, 2022
Rollup of 6 pull requests

Successful merges:

 - rust-lang#102275 (Stabilize `half_open_range_patterns`)
 - rust-lang#102323 (Trying to suggest additional lifetime parameter)
 - rust-lang#102345 (Recover from impl Trait in type param bound)
 - rust-lang#102845 (Elaborate trait ref to compute object safety.)
 - rust-lang#102860 (Add missing documentation for FileNameDisplayPreference variants)
 - rust-lang#102862 (From<Alignment> for usize & NonZeroUsize)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e435a05 into rust-lang:master Oct 10, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 10, 2022
@GuillaumeGomez GuillaumeGomez deleted the missing-docs-FileNameDisplayPreference branch October 10, 2022 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants