about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2023-10-14Rollup merge of #115439 - fmease:rustdoc-priv-repr-transparent-heuristic, ↵Matthias Krüger-0/+20
r=GuillaumeGomez rustdoc: hide `#[repr(transparent)]` if it isn't part of the public ABI Fixes #90435. This hides `#[repr(transparent)]` when the non-1-ZST field the struct is "transparent" over is private. CC `@RalfJung` Tentatively nominating it for the release notes, feel free to remove the nomination. `@rustbot` label needs-fcp relnotes A-rustdoc-ui
2023-10-14Rollup merge of #116618 - chriswailes:riscv64-linux-android-vector, ↵Matthias Krüger-0/+16
r=workingjubilee Add the V (vector) extension to the riscv64-linux-android target spec This feature has been enabled and tested internally in the Android project.
2023-10-13MCP636: Add simpler and more explicit syntax to check-cfgUrgau-85/+135
This add a new form and deprecated the other ones: - cfg(name1, ..., nameN, values("value1", "value2", ... "valueN")) - cfg(name1, ..., nameN) or cfg(name1, ..., nameN, values()) - cfg(any()) It also changes the default exhaustiveness to be enable-by-default in the presence of any --check-cfg arguments.
2023-10-12Rollup merge of #116669 - ehuss:fix-platform-table, r=nikicMatthias Krüger-4/+0
Fix mips platform support entries. The table entries for these MIPS entries were broken because they had the wrong number of columns (from #116503). Additionally, there was a conflict with #115238, which made the same change (but on different lines, so git didn't complain).
2023-10-12Rollup merge of #116593 - tgross35:no-jump-tables-docs, r=compiler-errorsMatthias Krüger-0/+19
Add unstable book page for the no-jump-tables codegen option See tracking issue: https://github.com/rust-lang/rust/issues/116592
2023-10-12Fix mips platform support entries.Eric Huss-4/+0
2023-10-11Add documentation for the riscv64-android-linux targetChris Wailes-0/+16
This commit adds additional documentation describing the features/extensions required by the riscv64-linux-android target.
2023-10-11Auto merge of #115948 - notriddle:notriddle/logo-lockup, r=fmeasebors-0/+15
rustdoc: show crate name beside smaller logo *Blocked on https://github.com/rust-lang/cargo/pull/12800* ## Summary In this PR, the crate name and version are always shown in the sidebar, even in subpages, and the lateral navigation is always shown in the sidebar, even in modules. Clicking the crate name does the same thing clicking the logo always did: take you to the crate root (the crate's home page, at least within Rustdoc). The Rust logo is also no longer shown by default for non-Rust docs. ### Screenshots <details><summary>Before</summary> | | Macro | Module | |--|-------|--------| | In crate | ![image](https://github.com/rust-lang/rust/assets/1593513/d5db0a46-2bb6-44a2-a3aa-2d915ecb8595) |![image](https://github.com/rust-lang/rust/assets/1593513/61f8c1ee-c298-4e2c-b791-18ecb79ab83b) | In module[^1] | ![image](https://github.com/rust-lang/rust/assets/1593513/73abca59-0b69-4650-a1e2-7278ca34795c) | ![image](https://github.com/rust-lang/rust/assets/1593513/0baf02c2-2ec7-4674-80e5-a6a74a973376) [^1]: This PR also includes a bug fix for derive macros not showing up in the lateral navigation part of the sidebar </details> #### Whole sidebar screenshots | | Macro | Module | |--|-------|--------| | In crate | ![image](https://github.com/rust-lang/rust/assets/1593513/75d1bd07-41f7-4f11-ba24-fd5476e0586a) | ![image](https://github.com/rust-lang/rust/assets/1593513/52960259-2b65-4131-b380-01826f0a0eb7) | In module | ![image](https://github.com/rust-lang/rust/assets/1593513/06e57928-8cb0-41bd-b152-be16cc53e5ec) | ![image](https://github.com/rust-lang/rust/assets/1593513/37291c69-2a07-4467-a382-d9b029084a47) #### Different logo configurations | | Short crate name | Long crate name | |---------|------------------|-----------------| | Root | ![short-root] | ![long-root] | Subpage | ![short-subpage] | ![long-subpage] [short-root]: https://github.com/rust-lang/rust/assets/1593513/9e2b4fa8-f581-4106-b562-1e0372c13f79 [short-subpage]: https://github.com/rust-lang/rust/assets/1593513/8331cdb8-fa13-4671-a1e2-dcc1cdca7451 [long-root]: https://github.com/rust-lang/rust/assets/1593513/7d377fec-0f1d-4343-9f82-0e35a8f58056 [long-subpage]: https://github.com/rust-lang/rust/assets/1593513/3b3094a4-63c9-477c-8c15-b6075837df30 ##### Without a logo ![image](https://github.com/rust-lang/rust/assets/1593513/66672b79-6c59-4be8-a527-25ef6f0b04ab) ### Preview pages https://notriddle.com/rustdoc-html-demo-5/sidebar-layout-rocket/rocket/index.html https://notriddle.com/rustdoc-html-demo-5/sidebar-layout-rocket/rocket_sync_db_pools/index.html https://notriddle.com/rustdoc-html-demo-5/sidebar-layout-rust-compiler/index.html https://notriddle.com/rustdoc-html-demo-5/sidebar-layout-rust/std/index.html https://notriddle.com/rustdoc-html-demo-5/sidebar-layout-rocket/tokio/index.html ## Motivation This improves visual information density (the construct with the logo and crate name is *shorter* than the logo on its own, because it's not square) and navigation clarity (we can now see what clicking the Rust logo does, specifically). Compare this with the layout at [Phoenix's Hexdocs] (which is what this proposal is closely based on), the old proposal on [Internals Discourse] (which always says "Rust standard library" in the sidebar, but doesn't do the side-by-side layout). [Phoenix's Hexdocs]: https://hexdocs.pm/phoenix/1.7.7/overview.html [Internals Discourse]: https://internals.rust-lang.org/t/poc-of-a-new-design-for-the-generated-rustdoc/11018 ## Guide-level explanation This PR cleans up some of the sidebar navigation. It makes the logo in the desktop sidebar a bit smaller, and puts the crate name and version next to it (either beside it, or below it, depending on if there's space), making it clearer what clicking on it does: click the crate name to open the crate's home page. It also removes the Rust logo from non-official-Rust crates, again to make the navigation and supply chain clearer (since the crate name has been added, the logo is no longer necessary for navigation). It adds a bit more clarifying information for lateral navigation. On items that don't add their own sidebar items, it just shows its siblings directly below the crate name and logo, but for other items, it shows "In crate alloc" instead of just "In alloc". It also shows the lateral navigation tools on module pages, making modules consistent with every other item. ## Drawbacks While this actually takes up less screen real estate than the old layout on desktop, it takes up more HTML. It's also a bit more visually complex. ## Rationale and alternatives I could do what the Internals POC did and keep the vertically stacked layout all the time, instead of doing a horizontal stack where possible. It would take up more screen real estate, though. ## Prior art This design is lifted almost verbatim from Hexdocs. It seems to work for them. [`opentelemetry_process_propagator`], for example, has a long application name. [`opentelemetry_process_propagator`]: https://hexdocs.pm/opentelemetry_process_propagator/OpentelemetryProcessPropagator.html ## Unresolved questions Maybe we should encourage crate authors to include their own logo more often? It certainly helps give people a better sense of "place." This seems to be blocked on coming up with an API to do it without requiring them to host the file somewhere. ## Future possibilities Beyond this, plenty of other changes could be made to improve the layout, like * Fix things so that clicking an item in the sidebar doesn't cause it to scroll back to the top. * The [Internals demo](https://utherii.github.io/new.html) does this right: clicking an item in the sidebar changes the content area, but the sidebar itself does not change. This is nice, because clicking is cheap and I can skim the opening few paragraphs while browsing. * The layout of the docs sidebar causes trouble to implement this, because it's different on different pages, but at least fix this on the file browser. * Come up with a less cluttered way to do disclosure. There's a lot of `[-]` on the page. * We don't lack ideas to fix this one. We have *too many*. * Do a better job of separating local navigation (vec::Vec links to vec::IntoIter) and the table of contents (vec::Vec links to vec::Vec::new). * A possibility: add a Back arrow next to the "In [module]" header? ![image](https://github.com/rust-lang/rust/assets/1593513/e969faf7-7722-457a-b8c6-8d962e9e1e23) * Give readers more control of how much rustdoc shows them, and giving doc authors more control of how much it generates. Basically, https://github.com/rust-lang/rust/pull/115660 is great, let's do it too. But those are mostly orthogonal, not future possibilities unlocked by this change.
2023-10-11Rollup merge of #116611 - mejrs:diagnostic_namespace, r=ehussAli MJ Al-Nasrawy-0/+84
Document `diagnostic_namespace` feature This adds it to the rust unstable book. FWIW: I couldn't find a way to serve the book locally (please send help), so I can't check that this renders correctly. cc `@weiznich`
2023-10-11Document `diagnostic_namespace` featuremejrs-0/+84
2023-10-10Rollup merge of #116574 - rustbot:docs-update, r=ehussGuillaume Gomez-0/+0
Update books ## rust-lang/reference 2 commits in 5262e1c3b43a2c489df8f6717683a44c7a2260fd..142b2ed77d33f37a9973772bd95e6144ed9dce43 2023-10-07 19:41:21 UTC to 2023-09-26 12:26:35 UTC - replace 'UB on raw ptr deref' with UB on place projection/access (rust-lang/reference#1387) - docs: Fix links to ECMA standards in `attributes.md` (rust-lang/reference#1408) ## rust-lang/rust-by-example 11 commits in c954202c1e1720cba5628f99543cc01188c7d6fc..8eb3a01ab74c567b7174784892fb807f2c632d6b 2023-09-26 12:38:17 UTC to 2023-09-26 12:29:10 UTC - fixed a typo in the lifetime.md (rust-lang/rust-by-example#1737) - Misleading textual statement in HOF (rust-lang/rust-by-example#1731) - Equalize title from respective file with title in SUMMARY.md (rust-lang/rust-by-example#1738) - Added explanation for compiling and executing match_args.rs. (rust-lang/rust-by-example#1739) - Wrapped long lines and put #[doc] in backquotes. (rust-lang/rust-by-example#1740) - Update read_lines example to flatten iterator (rust-lang/rust-by-example#1742) - Update while_let.md: address inconsistent use of fn main between 2 co… (rust-lang/rust-by-example#1744) - [TRIVIAL] Remove confusing `also` (rust-lang/rust-by-example#1746) - Fix and extend the explanation of outer vs inner attributes. (rust-lang/rust-by-example#1748) - Fix uncorresponded back quote (rust-lang/rust-by-example#1749) - Fix format in constants.md (rust-lang/rust-by-example#1741) ## rust-lang/rustc-dev-guide 3 commits in a13b7c28ed705891c681ce5417b3d1cdb12cecd1..b98af7d661e4744baab81fb8dc7a049e44a4a998 2023-10-05 19:48:35 UTC to 2023-09-27 22:57:27 UTC - update new trait solver docs (rust-lang/rustc-dev-guide#1802) - update rustc_driver examples (rust-lang/rustc-dev-guide#1803) - test headers: fix `compile-flags` example (rust-lang/rustc-dev-guide#1800)
2023-10-10Rollup merge of #116503 - ehuss:fix-mips-tier, r=AmanieuGuillaume Gomez-0/+4
Update docs for mips target tier demotion. These mips targets were demoted in #113274, but the documentation was not updated. I have also elected to document this in the release notes for 1.72 because I think that should have been included.
2023-10-10Add unstable book page for the no-jump-tables codegen optionTrevor Gross-0/+19
2023-10-09Update booksrustbot-0/+0
2023-10-08rustdoc: remove rust logo from non-Rust cratesMichael Howell-0/+15
2023-10-08Drop mips*-unknown-linux-musl* to tier 3Jubilee Young-4/+4
Also be more pedantic about spelling: - LE? Is it "less than or equal to"? Say "little endian". - We're Rust, not C, preserve the initial capital in "N64". - "MUSL" doesn't stand for anything; Rich Felker spells it "musl".
2023-10-08Drop mips*-unknown-linux-gnu* to tier 3Jubilee Young-4/+4
In the process, be more pedantic about spelling: - LE? Do you mean "limited edition"? It's "little endian". - The name of the ABI is "N64" as in "Nintendo 64".
2023-10-07linker: Remove unstable legacy CLI linker flavorsVadim Petrochenkov-5/+3
2023-10-06Update docs for mips target tier demotion.Eric Huss-4/+4
2023-10-06Update platform docs for aarch64-apple-tvos-simSebastian Imlay-1/+4
2023-10-05Rollup merge of #116223 - catandcoder:master, r=cjgillotJubilee-1/+1
Fix misuses of a vs an Fixes the misuse of "a" vs "an", according to English grammatical expectations and using https://www.a-or-an.com/
2023-10-04Update documentation for LLVM CFI supportRamon de C Valle-76/+85
Updates documentation for LLVM CFI support with recommended information since the user can now rebuild and use both core and std with CFI enabled using the Cargo build-std feature.
2023-10-04Fix misuses of a vs ancui fliter-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-10-03Rollup merge of #113053 - RalfJung:x86_32-float, r=workingjubileeMatthias Krüger-21/+26
add notes about non-compliant FP behavior on 32bit x86 targets Based on ton of prior discussion (see all the issues linked from https://github.com/rust-lang/unsafe-code-guidelines/issues/237), the consensus seems to be that these targets are simply cursed and we cannot implement the desired semantics for them. I hope I properly understood what exactly the extent of the curse is here, let's make sure people with more in-depth FP knowledge take a close look! In particular for the tier 3 targets I have no clue which target is affected by which particular variant of the x86_32 FP curse. I assumed that `i686` meant SSE is used so the "floating point return value" is the only problem, while everything lower (`i586`, `i386`) meant x87 is used. I opened https://github.com/rust-lang/rust/issues/114479 to concisely describe and track the issue. Cc `@workingjubilee` `@thomcc` `@chorman0773` `@rust-lang/opsem` Fixes https://github.com/rust-lang/rust/issues/73288 Fixes https://github.com/rust-lang/rust/issues/72327
2023-10-03add notes about non-compliant FP behavior on 32bit x86 targetsRalf Jung-21/+26
2023-10-02Auto merge of #115898 - onur-ozkan:config-change-tracking, r=Mark-Simulacrumbors-3/+3
bootstrap major change detection implementation The use of `changelog-seen` and `bootstrap/CHANGELOG.md` has not been functional in any way for many years. We often do major/breaking changes but never update the changelog file or the `changelog-seen`. This is an alternative method for tracking major or breaking changes and informing developers when such changes occur. Example output when bootstrap detects a major change: ![image](https://github.com/rust-lang/rust/assets/39852038/ee802dfa-a02b-488b-a433-f853ce079b8a)
2023-10-02Auto merge of #116207 - Ayush1325:uefi_stdio, r=Mark-Simulacrumbors-1/+7
Stdio support for UEFI - Uses Simple Text Output Protocol and Simple Text Input Protocol - Reading is done one character at a time - Writing is done with max 4096 characters # Quirks ## Output Newline - UEFI uses CRLF for newline. So when running the application in UEFI shell (qemu VGA), the output of `println` looks weird. - However, since the UEFI shell supports piping output, I am unsure if doing any output post-processing is a good idea. UEFI shell `cat` command seems to work fine with just LF. ## Input Newline - `Stdin.read_line()` method is broken in UEFI shell. Pressing enter seems to be read as CR, which means LF is never encountered. - Works fine with input redirection from file. CC `@dvdhrm`
2023-10-02Update UEFI docsAyush Singh-1/+7
- Mention stdio support - Update the example Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2023-10-01implement major change tracking for the bootstrap configurationonur-ozkan-3/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-30Update location of `language-features/plugin.md`Emmanuel Ferdman-1/+1
2023-09-30Auto merge of #115368 - loongarch-rs:none-tier2, r=pietroalbinibors-3/+3
Promote loongarch64-unknown-none* to Tier 2 MCP: https://github.com/rust-lang/compiler-team/issues/664
2023-09-28Remove `rustc_lint_defs::lint_array`DaniPopes-6/+4
2023-09-28Rollup merge of #116213 - tmandry:doclnl, r=ehussMatthias Krüger-0/+8
Document -Zlink-native-libraries Originally added in #70095.
2023-09-27Document -Zlink-native-librariesTyler Mandry-0/+8
Originally added in #70095.
2023-09-27Auto merge of #114901 - compiler-errors:style-guide-wc, r=calebcartwrightbors-6/+32
Amend style guide section for formatting where clauses in type aliases This PR has two parts: 1. Amend wording about breaking before or after the `=`, which is a style guide bugfix to align it with current rustfmt behavior. 2. Explain how to format trailing (#89122) where clauses, which are preferred in both GATs (#90076) and type aliases (#114662). r? `@joshtriplett`
2023-09-27Update location of personalityEmmanuel Ferdman-1/+1
2023-09-26Rollup merge of #116153 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-embedded/book 1 commits in 99ad2847b865e96d8ae7b333d3ee96963557e621..eac173690b8cc99094e1d88bd49dd61127fbd285 2023-09-12 07:34:44 UTC to 2023-09-12 07:34:44 UTC - USB connector-type correction (rust-embedded/book#360) ## rust-lang/nomicon 1 commits in e3f3af69dce71cd37a785bccb7e58449197d940c..ddfa4214487686e91b21aa29afb972c08a8f0d5b 2023-09-22 17:04:10 UTC to 2023-09-22 17:04:10 UTC - Fill "Beneath `std`" (rust-lang/nomicon#413) ## rust-lang/reference 1 commits in ee7c676fd6e287459cb407337652412c990686c0..5262e1c3b43a2c489df8f6717683a44c7a2260fd 2023-09-18 18:28:31 UTC to 2023-09-18 18:28:31 UTC - we reserve the right to reduce our amount of UB (rust-lang/reference#1397) ## rust-lang/rustc-dev-guide 8 commits in 08bb147d51e815b96e8db7ba4cf870f201c11ff8..a13b7c28ed705891c681ce5417b3d1cdb12cecd1 2023-09-25 05:14:41 UTC to 2023-09-11 21:29:18 UTC - Clarify all the `{AP,RP}IT{,IT}` impl trait types (rust-lang/rustc-dev-guide#1798) - Modify build instructions for optimized build (rust-lang/rustc-dev-guide#1795) - Remove outdated references to coverage debug code (rust-lang/rustc-dev-guide#1797) - Add deep dive document about early/late bound parameters interacting with turbofish (rust-lang/rustc-dev-guide#1794) - explain the MIR const vs TY const situation (rust-lang/rustc-dev-guide#1793) - fix type name (rust-lang/rustc-dev-guide#1792) - Clarify that `run-coverage` only runs in some of the CI jobs (rust-lang/rustc-dev-guide#1791) - Document the `coverage-map` and `run-coverage` test suites (rust-lang/rustc-dev-guide#1790)
2023-09-26Promote loongarch64-unknown-none* to Tier 2WANG Rui-3/+3
MCP: https://github.com/rust-lang/compiler-team/issues/664
2023-09-25Update booksrustbot-0/+0
2023-09-25Fix typo in rustdoc unstable features docDaniPopes-1/+1
2023-09-24Auto merge of #105861 - Ayush1325:uefi-std-minimial, r=workingjubileebors-2/+75
Add Minimal Std implementation for UEFI # Implemented modules: 1. alloc 2. os_str 3. env 4. math # Related Links Tracking Issue: https://github.com/rust-lang/rust/issues/100499 API Change Proposal: https://github.com/rust-lang/libs-team/issues/87 # Additional Information This was originally part of https://github.com/rust-lang/rust/pull/100316. Since that PR was becoming too unwieldy and cluttered, and with suggestion from `@dvdhrm,` I have extracted a minimal std implementation to this PR. The example in `src/doc/rustc/src/platform-support/unknown-uefi.md` has been tested for `x86_64-unknown-uefi` and `i686-unknown-uefi` in OVMF. It would be great if someone more familiar with AARCH64 can help with testing for that target. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-09-24Auto merge of #104385 - BlackHoleFox:apple-minimum-bumps, r=petrochenkovbors-3/+2
Raise minimum supported Apple OS versions This implements the proposal to raise the minimum supported Apple OS versions as laid out in the now-completed MCP (https://github.com/rust-lang/compiler-team/issues/556). As of this PR, rustc and the stdlib now support these versions as the baseline: - macOS: 10.12 Sierra - iOS: 10 - tvOS: 10 - watchOS: 5 (Unchanged) In addition to everything this breaks indirectly, these changes also erase the `armv7-apple-ios` target (currently tier 3) because the oldest supported iOS device now uses ARMv7s. Not sure what the policy around tier3 target removal is but shimming it is not an option due to the linker refusing. [Per comment](https://github.com/rust-lang/compiler-team/issues/556#issuecomment-1297175073), this requires a FCP to merge. cc `@wesleywiser.`
2023-09-23Raise minimum supported iOS version to 10.0BlackHoleFox-1/+0
Drop the armv7-apple-ios target too because its no longer supported with the hardware iOS 10 requires.
2023-09-23Raise minimum supported macOS to 10.12BlackHoleFox-2/+2
2023-09-22Rebase to masterAyush Singh-4/+6
- Update Example - Add thread_parking to sys::uefi - Fix unsafe in unsafe errors - Improve docs - Improve os/exit - Some asserts - Switch back to atomics Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2023-09-22Fixes from PRAyush Singh-1/+1
- Some comment fixes. - Make some functions unsafe. - Make helpers module private. - Rebase on master - Update r-efi to v4.2.0 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-09-22Add support for building `std::os::uefi` docsAyush Singh-6/+5
Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-09-22Fixes from PRAyush Singh-20/+24
Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-09-22Add Minimal Std implementation for UEFIAyush Singh-2/+70
Implemented modules: 1. alloc 2. os_str 3. env 4. math Tracking Issue: https://github.com/rust-lang/rust/issues/100499 API Change Proposal: https://github.com/rust-lang/libs-team/issues/87 This was originally part of https://github.com/rust-lang/rust/pull/100316. Since that PR was becoming too unwieldy and cluttered, and with suggestion from @dvdhrm, I have extracted a minimal std implementation to this PR. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-09-21Auto merge of #115230 - Vtewari2311:mod-hurd-latest, r=b-naberbors-0/+37
added support for GNU/Hurd adding support for i686-unknown-hurd-gnu