about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
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
2023-06-17Auto merge of #100036 - DrMeepster:box_free_free_box, r=oli-obkbors-8/+8
Remove `box_free` lang item This PR removes the `box_free` lang item, replacing it with `Box`'s `Drop` impl. Box dropping is still slightly magic because the contained value is still dropped by the compiler.
2023-06-17fix typo in `rustdoc/src/what-is-rustdoc.md`Joe Chen-1/+1
2023-06-16Fix edit failTyler Mandry-1/+0
2023-06-16Fix --rust-build flag in docsTyler Mandry-1/+2
2023-06-16Replace fvdl with ffx, allow test without installDavid Koloski-11/+8
Along with replacing fvdl uses with the equivalent ffx commands, this also switches from using the install path for libstd-*.so and libtest-*.so to using the build directory (now passed on the command line). The user no longer needs to run x.py install before running tests now, and the correct libstd and libtest are detected on run instead of startup so the test runner can handle recompilations after starting the testing environment.
2023-06-16remove box_free and replace with drop implDrMeepster-8/+8
2023-06-15Rollup merge of #112304 - GuillaumeGomez:re-exports, r=notriddleMatthias Krüger-1/+180
Add chapter in rustdoc book for re-exports and add a regression test for `#[doc(hidden)]` behaviour Fixes https://github.com/rust-lang/rust/issues/109449. Fixes https://github.com/rust-lang/rust/issues/53417. After the discussion in #109697, I made a few PRs to fix a few corner cases: * https://github.com/rust-lang/rust/pull/112178 * https://github.com/rust-lang/rust/pull/112108 * https://github.com/rust-lang/rust/pull/111997 With this I think I covered all cases. Only thing missing at this point was a chapter covering re-exports in the rustdoc book. r? `@notriddle`
2023-06-14Add documentation for paths in rustdoc searchGuillaume Gomez-0/+5
2023-06-14Introduce a minimum CGU size in non-incremental builds.Nicholas Nethercote-2/+2
Because tiny CGUs make compilation less efficient *and* result in worse generated code. We don't do this when the number of CGUs is explicitly given, because there are times when the requested number is very important, as described in some comments within the commit. So the commit also introduces a `CodegenUnits` type that distinguishes between default values and user-specified values. This change has a roughly neutral effect on walltimes across the rustc-perf benchmarks; there are some speedups and some slowdowns. But it has significant wins for most other metrics on numerous benchmarks, including instruction counts, cycles, binary size, and max-rss. It also reduces parallelism, which is good for reducing jobserver competition when multiple rustc processes are running at the same time. It's smaller benchmarks that benefit the most; larger benchmarks already have CGUs that are all larger than the minimum size. Here are some example before/after CGU sizes for opt builds. - html5ever - CGUs: 16, mean size: 1196.1, sizes: [3908, 2992, 1706, 1652, 1572, 1136, 1045, 948, 946, 938, 579, 471, 443, 327, 286, 189] - CGUs: 4, mean size: 4396.0, sizes: [6706, 3908, 3490, 3480] - libc - CGUs: 12, mean size: 35.3, sizes: [163, 93, 58, 53, 37, 8, 2 (x6)] - CGUs: 1, mean size: 424.0, sizes: [424] - tt-muncher - CGUs: 5, mean size: 1819.4, sizes: [8508, 350, 198, 34, 7] - CGUs: 1, mean size: 9075.0, sizes: [9075] Note that CGUs of size 100,000+ aren't unusual in larger programs.
2023-06-12docs: 📝 Add missing targetsSergio Gasquez-4/+6
2023-06-10rustdoc: update book with `[]` syntaxMichael Howell-0/+5
2023-06-09Auto merge of #111626 - pjhades:output, r=b-naberbors-0/+6
Write to stdout if `-` is given as output file With this PR, if `-o -` or `--emit KIND=-` is provided, output will be written to stdout instead. Binary output (those of type `obj`, `llvm-bc`, `link` and `metadata`) being written this way will result in an error unless stdout is not a tty. Multiple output types going to stdout will trigger an error too, as they will all be mixded together. This implements https://github.com/rust-lang/compiler-team/issues/431 The idea behind the changes is to introduce an `OutFileName` enum that represents the output - be it a real path or stdout - and to use this enum along the code paths that handle different output types.
2023-06-07Auto merge of #111698 - Amanieu:force-static-lib, r=petrochenkovbors-2/+2
Force all native libraries to be statically linked when linking a static binary Previously, `#[link]` without an explicit `kind = "static"` would confuse the linker and end up producing a dynamically linked library because of the `-Bdynamic` flag. However this binary would not work correctly anyways since it was linked with startup code for a static binary. This PR solves this by forcing all native libraries to be statically linked when the output is a static binary that cannot link to dynamic libraries anyways. Fixes #108878 Fixes #102993
2023-06-07Force all native libraries to be statically linked when linking a static binaryAmanieu d'Antras-2/+2
2023-06-07Auto merge of #111819 - nikarh:vita-improved, r=Amanieubors-60/+15
Improved std support for ps vita target Fixed a couple of things in std support for ps vita via Vita SDK newlib oss implementation: - Added missing hardware features to target spec - Compile in thumb by default (newlib is also compiled in thumb) - Fixed fs calls. Vita newlib has a not-very-posix dirent. Also vita does not expose inodes, it's stubbed as 0 in stat, and I'm stubbing it here for dirent (because vita newlibs's dirent doesn't even have that field) - Enabled signal handlers for panic unwinding - Dropped static link requirement from the platform support md. Also, rearranged sections to better stick with the template.
2023-06-06Write to stdout if `-` is given as output fileJing Peng-0/+6
If `-o -` or `--emit KIND=-` is provided, output will be written to stdout instead. Binary output (`obj`, `llvm-bc`, `link` and `metadata`) being written this way will result in an error unless stdout is not a tty. Multiple output types going to stdout will trigger an error too, as they will all be mixded together.
2023-06-06Auto merge of #112361 - matthiaskrgr:rollup-39zxrw1, r=matthiaskrgrbors-0/+82
Rollup of 8 pull requests Successful merges: - #111250 (Add Terminator conversion from MIR to SMIR, part #2) - #112310 (Add new Tier-3 targets: `loongarch64-unknown-none*`) - #112334 (Add myself to highfive rotation) - #112340 (remove `TyCtxt::has_error_field` helper method) - #112343 (Prevent emitting `missing_docs` for `pub extern crate`) - #112350 (Avoid duplicate type sanitization of local decls in borrowck) - #112356 (Fix comment for `get_region_var_origins`) - #112358 (Remove default visitor impl in region constraint generation) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-06Add new Tier-3 targets: `loongarch64-unknown-none*`WANG Rui-0/+82
MCP: https://github.com/rust-lang/compiler-team/issues/628
2023-06-05Add description of forwards-compatible behavior.Eric Huss-0/+8
2023-06-05Add missing word "the".Eric Huss-1/+1