about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2024-12-13Fix powerpc64 big-endian FreeBSD ABITaiki Endo-1/+1
2024-12-06Rollup merge of #133930 - chriskrycho:mdbook-trpl-package, r=ehussMatthias Krüger-0/+0
rustbook: update to use new mdbook-trpl package from The Book Updates to the latest merge from `rust-lang/book` and simplifies the dependency chain there. There are now three preprocessors, but only one package, so everything is a lot nicer to deal with from the consuming POV (i.e. here).
2024-12-06Rollup merge of #130777 - azhogin:azhogin/reg-struct-return, r=workingjubileeMatthias Krüger-0/+15
rust_for_linux: -Zreg-struct-return commandline flag for X86 (#116973) Command line flag `-Zreg-struct-return` for X86 (32-bit) for rust-for-linux. This flag enables the same behavior as the `abi_return_struct_as_int` target spec key. - Tracking issue: https://github.com/rust-lang/rust/issues/116973
2024-12-05rustbook: update to use new mdbook-trpl package from The BookChris Krycho-0/+0
2024-12-05Rollup merge of #133867 - taiki-e:platform-support, r=NoratriebJacob Pratt-8/+8
Fix "std" support status of some tier 3 targets https://github.com/rust-lang/rust/pull/127265 marked targets with empty "std" support status as no-std targets in target-spec metadata: > * Where a targets 'std' or 'host tools' support is listed as '?' in the rust docs, these are left as 'None' with this PR. The corresponding changes in cargo will only reject an attempt to build std if the 'std' field is 'Some(false)'. In the case it is 'None', cargo will continue trying to build However, this is not accurate because "std" support status has a marker indicating that it is a no-std target. (empty status is just invalid.) https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3 > The `std` column in the table below has the following meanings: > > * ✓ indicates the full standard library is available. > * \* indicates the target only supports [`no_std`] development. > * ? indicates the standard library support is unknown or a work-in-progress. > > [`no_std`]: https://rust-embedded.github.io/book/intro/no-std.html This PR fixes the status of targets whose "std" support status is currently set to empty and update target-spec metadata. The new status is set based on the following criteria: - Set to ✓ for targets that I regularly check in [rust-cross-toolchain](https://github.com/taiki-e/rust-cross-toolchain) that the `cargo test` works. (riscv32-unknown-linux-gnu,{riscv64,s390x}-unknown-linux-musl) - Targets where `cargo run` works but `cargo test` does not work tend to have incomplete std support (e.g., riscv32 musl https://github.com/taiki-e/rust-cross-toolchain/commit/f3068b66e042895806538bebba1ea982f13bfbb1), so I included them in the group below that means “work in progress” rather than in this group. - Set powerpc64le FreeBSD to ✓ on both std and host_tools, because the [Rust package](https://www.freshports.org/lang/rust/) is available. - Set to ? (which means "unknown" or “work in progress”) for all other affected targets because these are Linux, Android, FreeBSD, or Fuchsia, all of which are operating systems that support std if properly supported. r? Noratrieb cc ``@harmou01``
2024-12-05Rollup merge of #133761 - rustbot:docs-update, r=ehussLeón Orell Valerian Liehr-0/+0
Update books ## rust-lang/book 12 commits in e16dd73690a6cc3ecdc5f5d94bbc3ce158a42e16..614c19cb4025636eb2ba68ebb3d44e3bd3a5e6e4 2024-12-02 16:22:15 UTC to 2024-11-26 21:15:51 UTC - Fix more inverted uses of “shadowed” (rust-lang/book#4122) - Fix a couple inverted uses of “shadowed” (rust-lang/book#4121) - Fix confusion between variable `hello` and string `"hello"` (rust-lang/book#4118) - Ch. 17: fix some wording issues (rust-lang/book#4117) - Rephrase for clarity (rust-lang/book#3809) - Link to tests section of rustc book for `cargo test -- --help` docs (rust-lang/book#4116) - Drop a pedantry-triggering sentence about IEEE-754 (rust-lang/book#4114) - Very small clarification on if let (rust-lang/book#4113) - Ch17-05: Typos (rust-lang/book#4099) - Ch20-01: Fix typos (rust-lang/book#4105) - Add a short paragraph on editors and IDEs in installation (rust-lang/book#4112) - Rust 2024: update Ch. 20 for new `unsafe` rules (rust-lang/book#4111) ## rust-lang/reference 8 commits in 5c86c739ec71b8bc839310ff47fa94e94635bba9..ede56d1bbe132bac476b5029cd6d7508ca9572e9 2024-11-25 17:23:35 +0000 to 2024-12-03 22:26:55 +0000 - Claim to follow Unicode 16 for lexing identifiers. (rust-lang/reference#1688) - Clarify rules for on_unimplemented warnings (rust-lang/reference#1680) - Enable triagebot merge-conflict notifications (rust-lang/reference#1682) - Update default edition to 2024 for code examples (rust-lang/reference#1684) - Fix weak keywords (rust-lang/reference#1685) - `const` expression can borrow static items (rust-lang/reference#1610) - Update function-pointer.md for stabilization of `extended_varargs_abi_support` (rust-lang/reference#1687) - fix inconsistent spacing in example (rust-lang/reference#1686) ## edition-guide 1 commits in f48b0e842a3911c63240e955d042089e9e0894c7..128669297c8a7fdf771042eaec18b8adfaeaf0cd 2024-11-25 16:20:27 +0000 to 2024-12-03 22:02:43 +0000 - Fix `if_let_rescope` applicability (rust-lang/edition-guide#339) ## rust-lang/rustc-dev-guide 6 commits in 787b4166ccc67bd8f72a6e3ef6685ce9ce82909a..b21d99b770f9aceb0810c843847c52f86f45d2ed 2024-12-02 04:45:30 UTC to 2024-11-27 10:31:58 UTC - Spell out `git submodule deinit -f --all` (rust-lang/rustc-dev-guide#2153) - Explain how to deal with exploded git submodules (rust-lang/rustc-dev-guide#2152) - Update `//@ proc-macro` aux build directive docs (rust-lang/rustc-dev-guide#2149) - Remove `pretty-expanded` as it no longer exists (rust-lang/rustc-dev-guide#2147) - Fix trivial typo (rust-lang/rustc-dev-guide#2148) - Remove -Zfuel. (rust-lang/rustc-dev-guide#2032)
2024-12-04Update edition-guide and referenceEric Huss-0/+0
2024-12-05Fix "std" support status of some tier 3 targetsTaiki Endo-8/+8
2024-12-03Rollup merge of #133777 - the8472:document-randomize-layout, r=jieyouxuMatthias Krüger-0/+23
document -Zrandomize-layout in the unstable book tracking issue: #106764 fixes #130462
2024-12-03Auto merge of #104342 - mweber15:add_file_location_to_more_types, r=wesleywiserbors-0/+7
Require `type_map::stub` callers to supply file information This change attaches file information (`DIFile` reference and line number) to struct debug info nodes. Before: ``` ; foo.ll ... !5 = !DIFile(filename: "<unknown>", directory: "") ... !16 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", scope: !2, file: !5, size: 32, align: 32, elements: !17, templateParams: !19, identifier: "4cb373851db92e732c4cb5651b886dd0") ... ``` After: ``` ; foo.ll ... !3 = !DIFile(filename: "foo.rs", directory: "/home/matt/src/rust98678", checksumkind: CSK_SHA1, checksum: "bcb9f08512c8f3b8181ef4726012bc6807bc9be4") ... !16 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", scope: !2, file: !3, line: 3, size: 32, align: 32, elements: !17, templateParams: !19, identifier: "9e5968c7af39c148acb253912b7f409f") ... ``` Fixes #98678 r? `@wesleywiser`
2024-12-03document -Zrandomize-layout in the unstable bookThe 8472-0/+23
2024-12-02Update booksrustbot-0/+0
2024-12-02rust_for_linux: -Zreg-struct-return commandline flag for X86 (#116973)Andrew Zhogin-0/+15
2024-12-01Rollup merge of #133595 - GuillaumeGomez:missing_doc_code_examples, r=notriddleMatthias Krüger-0/+4
Do not emit `missing_doc_code_examples` rustdoc lint on module and a few other items It doesn't make sense to expect modules to have code examples. Same goes for: * Trait aliases * Foreign items * Associated types and constants Should make the use of this lint a bit nicer. r? ``@notriddle``
2024-11-30Extend documentation for `missing_doc_code_examples` rustdoc lint in the ↵Guillaume Gomez-0/+4
rustdoc book
2024-11-30Auto merge of #133659 - jieyouxu:rollup-576gh4p, r=jieyouxubors-2/+4
Rollup of 6 pull requests Successful merges: - #131551 (Support input/output in vector registers of PowerPC inline assembly) - #132515 (Fix and undeprecate home_dir()) - #132721 (CI: split x86_64-mingw job) - #133106 (changes old intrinsic declaration to new declaration) - #133496 (thread::available_parallelism for wasm32-wasip1-threads) - #133548 (Add `BTreeSet` entry APIs to match `HashSet`) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-30Rollup merge of #131551 - taiki-e:ppc-asm-vreg-inout, r=Amanieu许杰友 Jieyou Xu (Joe)-2/+4
Support input/output in vector registers of PowerPC inline assembly This extends currently clobber-only vector registers (`vreg`) support to allow passing `#[repr(simd)]` types as input/output. | Architecture | Register class | Target feature | Allowed types | | ------------ | -------------- | -------------- | -------------- | | PowerPC | `vreg` | `altivec` | `i8x16`, `i16x8`, `i32x4`, `f32x4` | | PowerPC | `vreg` | `vsx` | `f32`, `f64`, `i64x2`, `f64x2` | In addition to floats and `core::simd` types listed above, `core::arch` types and custom `#[repr(simd)]` types of the same size and type are also allowed. All allowed types and relevant target features are currently unstable. r? `@Amanieu` `@rustbot` label +O-PowerPC +A-inline-assembly
2024-11-30Rollup merge of #116161 - Soveu:varargs2, r=cjgillot许杰友 Jieyou Xu (Joe)-10/+0
Stabilize `extended_varargs_abi_support` I think that is everything? If there is any documentation regarding `extern` and/or varargs to correct, let me know, some quick greps suggest that there might be none. Tracking issue: https://github.com/rust-lang/rust/issues/100189
2024-11-29Rollup merge of #133577 - uweigand:s390x-doc-cloudaccess, r=jieyouxuMatthias Krüger-0/+16
Document s390x machine access via community cloud
2024-11-29Rollup merge of #133565 - longxiangqiao:master, r=ehussMatthias Krüger-1/+1
chore: fix 404 status URL
2024-11-29Support floats in input/output in vector registers of PowerPC inline assemblyTaiki Endo-1/+1
2024-11-28Document s390x machine access via community cloudUlrich Weigand-0/+16
2024-11-29Support #[repr(simd)] types in input/output of PowerPC inline assemblyTaiki Endo-2/+4
2024-11-28Rollup merge of #133452 - taiki-e:hexagon-asm-pred, r=AmanieuGuillaume Gomez-0/+2
Support predicate registers (clobber-only) in Hexagon inline assembly The result of the Hexagon instructions such as comparison, store conditional, etc. is stored in predicate registers (`p[0-3]`), but currently there is no way to mark it as clobbered in `asm!`. This is also needed for `clobber_abi` (although implementing `clobber_abi` will require the addition of support for [several more register classes](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp#L71-L90). see also https://github.com/rust-lang/rust/issues/93335#issuecomment-2395210055). Refs: - [Section 6 "Conditional Execution" in Qualcomm Hexagon V73 Programmer’s Reference Manual](https://docs.qualcomm.com/bundle/publicresource/80-N2040-53_REV_AB_Qualcomm_Hexagon_V73_Programmers_Reference_Manual.pdf#page=90) - [Register definition in LLVM](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Hexagon/HexagonRegisterInfo.td#L155) cc `@androm3da` (target maintainer of hexagon-unknown-{[none-elf](https://doc.rust-lang.org/nightly/rustc/platform-support/hexagon-unknown-none-elf.html#target-maintainers),[linux-musl](https://doc.rust-lang.org/nightly/rustc/platform-support/hexagon-unknown-linux-musl.html#target-maintainers)}) r? `@Amanieu` `@rustbot` label +A-inline-assembly (Currently there is no O-hexagon label...)
2024-11-28chore: fix 404 status URLlongxiangqiao-1/+1
Signed-off-by: longxiangqiao <longxiangqiao@qq.com>
2024-11-27Stabilize `extended_varargs_abi_support`Soveu-10/+0
2024-11-25Update booksEric Huss-0/+0
2024-11-25Support predicate registers (clobber-only) in Hexagon inline assemblyTaiki Endo-0/+2
2024-11-25Rollup merge of #131664 - taiki-e:s390x-asm-vreg-inout, r=AmanieuMatthias Krüger-0/+40
Support input/output in vector registers of s390x inline assembly (under asm_experimental_reg feature) This extends currently clobber-only vector registers (`vreg`) support to allow passing `#[repr(simd)]` types, floats (f32/f64/f128), and integers (i32/i64/i128) as input/output. This is unstable and gated under new `#![feature(asm_experimental_reg)]` (tracking issue: https://github.com/rust-lang/rust/issues/133416). If the feature is not enabled, only clober is supported as before. | Architecture | Register class | Target feature | Allowed types | | ------------ | -------------- | -------------- | -------------- | | s390x | `vreg` | `vector` | `i32`, `f32`, `i64`, `f64`, `i128`, `f128`, `i8x16`, `i16x8`, `i32x4`, `i64x2`, `f32x4`, `f64x2` | This matches the list of types that are supported by the vector registers in LLVM: https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZRegisterInfo.td#L301-L313 In addition to `core::simd` types and floats listed above, custom `#[repr(simd)]` types of the same size and type are also allowed. All allowed types other than i32/f32/i64/f64/i128, and relevant target features are currently unstable. Currently there is no SIMD type for s390x in `core::arch`, but this is tracked in https://github.com/rust-lang/rust/issues/130869. cc https://github.com/rust-lang/rust/issues/130869 about vector facility support in s390x cc https://github.com/rust-lang/rust/issues/125398 & https://github.com/rust-lang/rust/issues/116909 about f128 support in asm `@rustbot` label +O-SystemZ +A-inline-assembly
2024-11-25Rollup merge of #133297 - DianQK:embed-bitcode-ios, r=nikic许杰友 Jieyou Xu (Joe)-8/+5
Remove legacy bitcode for iOS Follow #117364.
2024-11-24Make s390x non-clobber-only vector register support unstableTaiki Endo-0/+40
2024-11-24embed-bitcode is no longer used in iOSDianQK-8/+5
2024-11-23Update TRPL to latest, including new Chapter 17: Async and AwaitChris Krycho-0/+0
This also incorporates a number of other changes and fixes which would normally have been part of the automatic update, but which were blocked from landing because of the changes required to support shipping a crate as part of the chapter, along with those changes.
2024-11-22Stabilize the 2024 editionEric Huss-2/+2
2024-11-21Rollup merge of #131544 - nbdd0121:asm_goto_safe_block, r=petrochenkovMatthias Krüger-1/+3
Make asm label blocks safe context Tracking issue: https://github.com/rust-lang/rust/issues/119364 `asm!()` is forced to be wrapped inside unsafe. If there's no special treatment, the label blocks would also always be unsafe with no way of opting out. It was suggested that a simple fix is to make asm label blocks safe: https://github.com/rust-lang/rust/issues/119364#issuecomment-2316037703. `@rustbot` labels: +A-inline-assembly +F-asm
2024-11-19Correct the tier listing of `wasm32-wasip2`Alex Crichton-1/+1
This target is tier 2, not tier 3, and I forgot to update this. Closes #133206
2024-11-19Rollup merge of #133191 - ↵León Orell Valerian Liehr-29/+33
aDotInTheVoid:whoops-thats-not-stable-and-might-never-be, r=fmease rustdoc book: Move `--test-builder(--wrapper)?` docs to unstable section. Tracking issue: https://github.com/rust-lang/rust/issues/102981 These have always been unstable, but were documented in the stable section in #114651
2024-11-19Rollup merge of #133186 - uweigand:s390x-maintainer, r=wesleywiserLeón Orell Valerian Liehr-2/+200
Document s390x-unknown-linux targets This adds documentation for the following existing targets: s390x-unknown-linux-gnu (Tier 2 with host tools) s390x-unknown-linux-musl (Tier 3) I volunteer as maintainer for these targets going forward.
2024-11-18rustdoc book: Move `--test-builder(--wrapper)?` docs to unstable section.Alona Enraght-Moony-29/+33
2024-11-18Update src/doc/rustc/src/platform-support/s390x-unknown-linux-gnu.mdUlrich Weigand-0/+1
Co-authored-by: Josh Stone <cuviper@gmail.com>
2024-11-18Update booksrustbot-0/+0
2024-11-18Document s390x-unknown-linux targetsUlrich Weigand-2/+199
This adds documentation for the following existing targets: s390x-unknown-linux-gnu (Tier 2 with host tools) s390x-unknown-linux-musl (Tier 3) I volunteer as maintainer for these targets going forward. Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2024-11-12Rollup merge of #132793 - ehuss:update-mdbook, r=Mark-SimulacrumMatthias Krüger-0/+0
Update mdbook to 0.4.42 This updates mdbook to 0.4.42 Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0441 There were some significant changes that I would like to get early testing on. This also updates rust-by-example which was required due to an update to the theme file.
2024-11-11Auto merge of #127589 - notriddle:notriddle/search-sem-3, r=GuillaumeGomezbors-5/+7
rustdoc-search: simplify rules for generics and type params **Heads up!**: This PR is a follow-up that depends on #124544. It adds 12dc24f46007f82b93ed85614347a42d47580afa, a change to the filtering behavior, and 9900ea48b566656fb12b5fcbd0a1b20aaa96e5ca, a minor ranking tweak. Part of https://github.com/rust-lang/rust-project-goals/issues/112 This PR overturns https://github.com/rust-lang/rust/pull/109802 ## Preview * no results: [`Box<[A]> -> Vec<B>`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=Box%3C%5BA%5D%3E%20-%3E%20Vec%3CB%3E) * results: [`Box<[A]> -> Vec<A>`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=Box%3C%5BA%5D%3E%20-%3E%20Vec%3CA%3E) * [`T -> U`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=T%20-%3E%20U) * [`Cx -> TyCtxt`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3-compiler/rustdoc/index.html?search=Cx%20-%3E%20TyCtxt) ![image](https://github.com/user-attachments/assets/015ae28c-7469-4f7f-be03-157d28d7ec97) ## Description This commit is a response to feedback on the displayed type signatures results, by making generics act stricter. - Order within generics is significant. This means `Vec<Allocator>` now matches only with a true vector of allocators, instead of matching the second type param. It also makes unboxing within generics stricter, so `Result<A, B>` only matches if `B` is in the error type and `A` is in the success type. The top level of the function search is unaffected. - Generics are only "unboxed" if a type is explicitly opted into it. References and tuples are hardcoded to allow unboxing, and Box, Rc, Arc, Option, Result, and Future are opted in with an unstable attribute. Search result unboxing is the process that allows you to search for `i32 -> str` and get back a function with the type signature `&Future<i32> -> Box<str>`. - Instead of ranking by set overlap, it ranks by the number of items in the type signature. This makes it easier to find single type signatures like transmute. ## Find the discussion on * <https://rust-lang.zulipchat.com/#narrow/stream/393423-t-rustdoc.2Fmeetings/topic/meeting.202024-07-08/near/449965149> * <https://github.com/rust-lang/rust/pull/124544#issuecomment-2204272265> * <https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/deciding.20on.20semantics.20of.20generics.20in.20rustdoc.20search>
2024-11-10Stabilize Arm64EC inline assemblyTaiki Endo-30/+2
2024-11-09Rollup merge of #132824 - kadenlnelson:patch/wasi-c-abi-doc, r=workingjubileeJubilee-2/+2
Update grammar in wasm-c-abi's compiler flag documentation This PR adjusts the grammar of the `wasm-c-abi` compiler flag documentation. See the inline comments within the PR for details.
2024-11-09Rollup merge of #131258 - taiki-e:s390x-stabilize-asm, r=AmanieuJubilee-19/+2
Stabilize s390x inline assembly This stabilizes inline assembly for s390x (SystemZ). Corresponding reference PR: https://github.com/rust-lang/reference/pull/1643 --- From the requirements of stabilization mentioned in https://github.com/rust-lang/rust/issues/93335 > Each architecture needs to be reviewed before stabilization: > - It must have clobber_abi. Done in https://github.com/rust-lang/rust/pull/130630. > - It must be possible to clobber every register that is normally clobbered by a function call. Done in the PR that added support for clobber_abi. > - Generally review that the exposed register classes make sense. The followings can be used as input/output: - `reg` (`r[0-10]`, `r[12-14]`): General-purpose register - `reg_addr` (`r[1-10]`, `r[12-14]`): General-purpose register except `r0` which is evaluated as zero in an address context This class is needed because `r0`, which may be allocated when using the `reg` class, cannot be used as a register in certain contexts. This is identical to the `a` constraint in LLVM and GCC. See https://github.com/rust-lang/rust/pull/119431 for details. - `freg` (`f[0-15]`): Floating-point register The followings are clobber-only: - `vreg` (`v[0-31]`): Vector register Technically `vreg` should be able to accept `#[repr(simd)]` types as input/output if the unstable `vector` target feature added is enabled, but `core::arch` has no s390x vector type and both `#[repr(simd)]` and `core::simd` are unstable. Everything related is unstable, so the fact that this is currently a clobber-only should not be considered a stabilization blocker. (https://github.com/rust-lang/rust/issues/130869 tracks unstable stuff here) - `areg` (`a[2-15]`): Access register All of the above register classes except `reg_addr` are needed for `clobber_abi`. The followings cannot be used as operands for inline asm (see also [getReservedRegs](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp#L258-L282) and [SystemZELFRegisters](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h#L107-L128) in LLVM): - `r11`: frame pointer - `r15`: stack pointer - `a0`, `a1`: Reserved for system use - `c[0-15]` (control register) Reserved by the kernel Although not listed in the above requirements, `preserves_flags` is implemented in https://github.com/rust-lang/rust/pull/111331. --- cc ``@uweigand`` r? ``@Amanieu`` ``@rustbot`` label +O-SystemZ +A-inline-assembly
2024-11-09Update grammar in wasm-c-abi's compiler flag documentationKaden Nelson-2/+2
Co-authored-by: Jubilee <workingjubilee@gmail.com>
2024-11-08Update mdbook to 0.4.42Eric Huss-0/+0
2024-11-08remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic ↵Ralf Jung-2/+2
functions instead