about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2023-07-06Rollup merge of #113384 - joshtriplett:style-guide-grammar, r=compiler-errorsfee1-dead-11/+12
style-guide: Clarify grammar for small patterns (not a semantic change) The grammar as written feels ambiguous and confusing, in large part because it uses square brackets and commas in the names of non-terminals. Rewrite it to avoid symbols in the names of non-terminals, and to instead wrap terminals in backquotes. Also rename "smallntp" to "small_no_tuple" to make it self-describing.
2023-07-06Rollup merge of #113145 - ↵fee1-dead-2/+3
joshtriplett:style-guide-document-assignment-newlines, r=joshtriplett style-guide: Document newline rules for assignment operators The style guide gives general rules for binary operators including assignment, and one of those rules says to put the operator on the subsequent line; the style guide needs to explicitly state the exception of breaking *after* assignment operators rather than before. This is already what rustfmt does and what users do; this fixes the style guide to match the expected default style.
2023-07-05style-guide: Rename "smallntp" non-terminal to "small_no_tuple" for clarityJosh Triplett-4/+4
The meaning of "smallntp" was not immediately obvious at a glance. Rename it to the self-describing "small_no_tuple"
2023-07-05style-guide: Clarify grammar for small patterns (not a semantic change)Josh Triplett-11/+12
The grammar as written feels ambiguous and confusing, in large part because it uses square brackets and commas in the names of non-terminals. Rewrite it to avoid symbols in the names of non-terminals, and to instead wrap terminals in backquotes.
2023-07-05style-guide: Add chapter for nightly formattingJosh Triplett-3/+5
Co-authored-by: Michael Goulet <michael@errs.io>
2023-07-05Clarify that style guide does not cover nightly-only featuresMichael Goulet-0/+4
2023-07-05Add support for NetBSD/riscv64 aka. riscv64gc-unknown-netbsd.Havard Eidnes-0/+2
2023-07-03Update platform-support.mdJonathan Pallant (Ferrous Systems)-32/+32
Updates the descriptions of the various ARM targets in platform-support.md so they are a little more consistent. For example, all instances of ARMv7 changed to ARMv7-A (as opposed to ARMv7-R and ARMv7-M).
2023-07-02Auto merge of #108537 - ↵bors-0/+5
GuillaumeGomez:rustdoc-search-whitespace-as-separator, r=notriddle rustdoc: Allow whitespace as path separator like double colon Fixes https://github.com/rust-lang/rust/issues/108447. I think it makes sense since it allows more common cases, however it also makes the syntax heavier. Not sure what the rest of the team thinks about it. In any case we'll need to go through FCP. Full explanation for the changes is available [here](https://github.com/rust-lang/rust/pull/108537#issuecomment-1589480564). r? `@notriddle`
2023-07-01Document tracking issue for rustdoc `show-type-layout`Trevor Gross-0/+2
2023-06-29Rollup merge of #113143 - ↵Matthias Krüger-1/+2
joshtriplett:style-guide-narrow-dereference-guidance, r=calebcartwright style-guide: Narrow guidance about references and dereferencing The style guide advises "prefer dereferencing to taking references", but doesn't give guidance on when that "preference" should get overridden by other considerations. Give an example of when it's fine to ignore that advice.
2023-06-29Rollup merge of #113140 - ↵Matthias Krüger-0/+5
joshtriplett:style-guide-example-multi-line-attribute, r=calebcartwright style-guide: Add an example of formatting a multi-line attribute We already say to format attributes like functions, but we didn't have an example of formatting a multi-line attribute.
2023-06-28style-guide: Document newline rules for assignment operatorsJosh Triplett-2/+3
The style guide gives general rules for binary operators including assignment, and one of those rules says to put the operator on the subsequent line; the style guide needs to explicitly state the exception of breaking *after* assignment operators rather than before. This is already what rustfmt does and what users do; this fixes the style guide to match the expected default style.
2023-06-28style-guide: Narrow guidance about references and dereferencingJosh Triplett-1/+2
The style guide advises "prefer dereferencing to taking references", but doesn't give guidance on when that "preference" should get overridden by other considerations. Give an example of when it's fine to ignore that advice.
2023-06-28style-guide: Add an example of formatting a multi-line attributeJosh Triplett-0/+5
We already say to format attributes like functions, but we didn't have an example of formatting a multi-line attribute.
2023-06-28syle-guide: Clarify let-else furtherJosh Triplett-2/+24
Give some additional examples with multi-line patterns. Make it clearer to go on to the next case if the conditions aren't met.
2023-06-26Update booksEric Huss-0/+0
2023-06-26Rollup merge of #112840 - loongarch-rs:update-docs, r=GuillaumeGomezMatthias Krüger-1/+1
doc: loongarch: Update maintainers My colleague, `@zhaixiaojuan,` has been completely occupied with other matters and is no longer in charge of Rust. Consequently, I intend to update the maintainers in the platform documentation to avoid causing any disruptions for her and to ensure that relevant notifications regarding LoongArch are promptly directed to the appropriate developers. Thanks your for contributions!
2023-06-26Rollup merge of #112559 - SergioGasquez:master, r=JohnTitorMatthias Krüger-4/+6
Add esp-idf missing targets Adds some esp-idf missing targets to the table
2023-06-26Rollup merge of #111326 - he32:netbsd-aarch64-be, r=oli-obkMatthias Krüger-6/+115
Add support for NetBSD/aarch64-be (big-endian arm64).
2023-06-25platform-support.md: remove references to not-yet upstreamed targets.Havard Eidnes-2/+0
2023-06-25SUMMARY.md: add entry for NetBSD.Havard Eidnes-0/+1
2023-06-24Rollup merge of #112912 - joshtriplett:style-let-else-clarifications, ↵Guillaume Gomez-43/+62
r=calebcartwright style-guide: Rewrite let-else section for clarity, without changing formatting The section as written did not cover all cases, and left some of them implicit. Rewrite it to systematically cover all cases. Place examples immediately following the corresponding case. In the process, reorder to move the simplest cases first: start with single-line and add progressively more line breaks. This does not change the meaning of the section at all, and in particular does not change the defined style for let-else statements.
2023-06-23Rollup merge of #112944 - ↵Matthias Krüger-0/+12
joshtriplett:style-guide-defaults-vs-configurability, r=compiler-errors style-guide: Add language disclaiming any effects on non-default Rust styles Make it clear that the style guide saying "must" doesn't forbid developers from doing differently (as though any power on this Earth could do that) and doesn't forbid tools from allowing any particular configuration options. Otherwise, people might wonder (for instance) if there's a semantic difference between "must" and "should" in the style guide, and whether tools are "allowed" to offer configurability of something that says "must".
2023-06-23Rollup merge of #112942 - joshtriplett:style-guide-tweaks, r=compiler-errorsMatthias Krüger-72/+88
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
2023-06-22style-guide: Add language disclaiming any effects on non-default Rust stylesJosh Triplett-0/+12
Make it clear that the style guide saying "must" doesn't forbid developers from doing differently (as though any power on this Earth could do that) and doesn't forbid tools from allowing any particular configuration options.
2023-06-22style-guide: Avoid referring to the style team in the past tenseJosh Triplett-2/+2
We live!
2023-06-22style-guide: Define what an item isJosh Triplett-0/+5
2023-06-22style-guide: Make link text in SUMMARY.md match the headings in the linked pagesJosh Triplett-5/+7
2023-06-22style-guide: Avoid hyphenating "semicolon"Josh Triplett-8/+8
2023-06-22style-guide: Rephrase a confusingly ordered, ambiguous sentence (and fix a typo)Josh Triplett-2/+3
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.
2023-06-22style-guide: Reword an awkwardly phrased recommendation (and fix a typo)Josh Triplett-2/+2
2023-06-22style-guide: Clarify advice on names matching keywordsJosh Triplett-3/+3
In particular, specify what this advice is an alternative to (creative misspellings such as `krate`).
2023-06-22style-guide: Avoid normative recommendations for formatting tool configurabilityJosh Triplett-6/+2
It's not within the scope of the style guide to tell formatting tools whether, or how, to allow configurability of non-default formatting.
2023-06-22style-guide: Update cargo.md for authors being optional and not recommendedJosh Triplett-9/+10
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".
2023-06-22style-guide: Define (and capitalize) "ASCIIbetically"Josh Triplett-3/+3
The style guide didn't give any definition for it.
2023-06-22style-guide: Remove inaccurate statement about rustfmtJosh Triplett-4/+0
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.
2023-06-22style-guide: Consistently refer to rustfmt as `rustfmt`Josh Triplett-5/+5
2023-06-22style-guide: s/right-ward/rightward/Josh Triplett-1/+1
We already use the word "rightward" elsewhere; avoid the unnecessarily hyphenated "right-ward".
2023-06-22style-guide: Move and expand text about trailing commasJosh Triplett-7/+21
`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.
2023-06-22style-guide: Move text about block vs visual indent to indentation sectionJosh Triplett-17/+18
`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.
2023-06-22style-guide: Fix typoJosh Triplett-1/+1
"does done fit" should have been "does not fit".
2023-06-22Remove extra trailing newlineWesley Wiser-1/+0
2023-06-21style-guide: Rewrite let-else section for clarity, without changing formattingJosh Triplett-43/+62
The section as written did not cover all cases, and left some of them implicit. Rewrite it to systematically cover all cases. Place examples immediately following the corresponding case. In the process, reorder to move the simplest cases first: start with single-line and add progressively more line breaks. This does not change the meaning of the section at all, and in particular does not change the defined style for let-else statements.
2023-06-21Note that posix_spawnp probably still does not work the way people may wantThom Chiovoloni-3/+5
2023-06-21Note the incomplete Command support in the apple-tvos.md documentThom Chiovoloni-3/+16
2023-06-21Apply suggestions from code reviewThom Chiovoloni-7/+7
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
2023-06-21Fix missing link in SUMMARY.mdThom Chiovoloni-0/+1
2023-06-21Add a tvOS entry to the platform-support documentationThom Chiovoloni-2/+72
2023-06-20doc: loongarch: Update maintainersWANG Rui-1/+1