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

style-guide: Organizational and editing tweaks (no semantic changes) #112942

Merged
merged 15 commits into from
Jun 23, 2023

Conversation

joshtriplett
Copy link
Member

I'd recommend reviewing this PR commit-by-commit; each commit is self-contained
and should be easy to review at a glance.

  • style-guide: Move text about block vs visual indent to indentation section
  • style-guide: Move and expand text about trailing commas
  • style-guide: s/right-ward/rightward/
  • style-guide: Consistently refer to rustfmt as rustfmt
  • style-guide: Remove inaccurate statement about rustfmt
  • style-guide: Define (and capitalize) "ASCIIbetically"
  • style-guide: Update cargo.md for authors being optional and not recommended
  • style-guide: Avoid normative recommendations for formatting tool configurability
  • style-guide: Clarify advice on names matching keywords
  • style-guide: Reword an awkwardly phrased recommendation (and fix a typo)
  • style-guide: Rephrase a confusingly ordered, ambiguous sentence (and fix a typo)
  • style-guide: Avoid hyphenating "semicolon"
  • style-guide: Make link text in SUMMARY.md match the headings in the linked pages
  • style-guide: Define what an item is
  • style-guide: Avoid referring to the style team in the past tense

…ction

`principles.md` includes some high-level guiding principles for
formatting, but also includes a few specific formatting provisions.
While those provisions apply in many places, the same holds true for
other high-level guidance, such as the indentation section. Move the
text about using block indent rather than visual indent to the
indentation section, so that `principles.md` can focus on guiding
principles while the top level of the style guide gives concrete
formatting recommendations.
`principles.md` includes some high-level guiding principles for
formatting, but also includes a few specific formatting provisions.
While those provisions apply in many places, the same holds true for
other high-level guidance. Move the text about trailing commas to
`README.md`, so that `principles.md` can focus on guiding principles
while the top level of the style guide gives concrete formatting
recommendations.
We already use the word "rightward" elsewhere; avoid the unnecessarily
hyphenated "right-ward".
rustfmt does include a mechanism to distinguish standard library
imports, which it does syntactically by crate name. Avoid making a
misleading statement that implies it cannot do this.
The style guide didn't give any definition for it.
…mended

Change an example using the authors field to use a long feature list instead.

Change the conventions for the authors field to say "if present".
…igurability

It's not within the scope of the style guide to tell formatting tools
whether, or how, to allow configurability of non-default formatting.
In particular, specify what this advice is an alternative to (creative
misspellings such as `krate`).
…fix a typo)

This sentence had a parenthetical without a closing parenthesis, and had
the phrase "which doesn't require special formatting" ambiguously at the
end of a list when it only applied to the last item of the list.
@joshtriplett joshtriplett added the T-style Relevant to the style team, which will review and decide on the PR/issue. label Jun 22, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jun 22, 2023

r? @compiler-errors

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 22, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jun 22, 2023

Some changes occurred in src/doc/style-guide

cc @rust-lang/style

Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

r=me nits or not

src/doc/style-guide/src/items.md Outdated Show resolved Hide resolved
src/doc/style-guide/src/README.md Show resolved Hide resolved
src/doc/style-guide/src/advice.md Show resolved Hide resolved
@joshtriplett
Copy link
Member Author

@bors r=@compiler-errors

@bors
Copy link
Contributor

bors commented Jun 22, 2023

📌 Commit fcc23a3 has been approved by compiler-errors

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 Jun 22, 2023
@joshtriplett
Copy link
Member Author

@bors rollup

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 23, 2023
…=compiler-errors

style-guide: Organizational and editing tweaks (no semantic changes)

I'd recommend reviewing this PR commit-by-commit; each commit is self-contained
and should be easy to review at a glance.

- style-guide: Move text about block vs visual indent to indentation section
- style-guide: Move and expand text about trailing commas
- style-guide: s/right-ward/rightward/
- style-guide: Consistently refer to rustfmt as `rustfmt`
- style-guide: Remove inaccurate statement about rustfmt
- style-guide: Define (and capitalize) "ASCIIbetically"
- style-guide: Update cargo.md for authors being optional and not recommended
- style-guide: Avoid normative recommendations for formatting tool configurability
- style-guide: Clarify advice on names matching keywords
- style-guide: Reword an awkwardly phrased recommendation (and fix a typo)
- style-guide: Rephrase a confusingly ordered, ambiguous sentence (and fix a typo)
- style-guide: Avoid hyphenating "semicolon"
- style-guide: Make link text in SUMMARY.md match the headings in the linked pages
- style-guide: Define what an item is
- style-guide: Avoid referring to the style team in the past tense
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 23, 2023
…=compiler-errors

style-guide: Organizational and editing tweaks (no semantic changes)

I'd recommend reviewing this PR commit-by-commit; each commit is self-contained
and should be easy to review at a glance.

- style-guide: Move text about block vs visual indent to indentation section
- style-guide: Move and expand text about trailing commas
- style-guide: s/right-ward/rightward/
- style-guide: Consistently refer to rustfmt as `rustfmt`
- style-guide: Remove inaccurate statement about rustfmt
- style-guide: Define (and capitalize) "ASCIIbetically"
- style-guide: Update cargo.md for authors being optional and not recommended
- style-guide: Avoid normative recommendations for formatting tool configurability
- style-guide: Clarify advice on names matching keywords
- style-guide: Reword an awkwardly phrased recommendation (and fix a typo)
- style-guide: Rephrase a confusingly ordered, ambiguous sentence (and fix a typo)
- style-guide: Avoid hyphenating "semicolon"
- style-guide: Make link text in SUMMARY.md match the headings in the linked pages
- style-guide: Define what an item is
- style-guide: Avoid referring to the style team in the past tense
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 23, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#111747 (Don't structurally resolve during method ambiguity in probe)
 - rust-lang#112704 (slice::from_raw_parts: mention no-wrap-around condition)
 - rust-lang#112927 (Fix indentation for where clause in rustdoc pages)
 - rust-lang#112933 (Avoid `&format` in error message code)
 - rust-lang#112935 (style-guide: Fix typo)
 - rust-lang#112941 (typo)
 - rust-lang#112942 (style-guide: Organizational and editing tweaks (no semantic changes))
 - rust-lang#112944 (style-guide: Add language disclaiming any effects on non-default Rust styles)
 - rust-lang#112948 (Avoid guessing unknown trait implementation in suggestions)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 441e59a into rust-lang:master Jun 23, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 23, 2023
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-style Relevant to the style 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