about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2024-03-05Auto merge of #120675 - oli-obk:intrinsics3.0, r=pnkfelixbors-1/+12
Add a scheme for moving away from `extern "rust-intrinsic"` entirely All `rust-intrinsic`s can become free functions now, either with a fallback body, or with a dummy body and an attribute, requiring backends to actually implement the intrinsic. This PR demonstrates the dummy-body scheme with the `vtable_size` intrinsic. cc https://github.com/rust-lang/rust/issues/63585 follow-up to #120500 MCP at https://github.com/rust-lang/compiler-team/issues/720
2024-03-04Auto merge of #121998 - matthiaskrgr:rollup-l7lzwpb, r=matthiaskrgrbors-23/+23
Rollup of 10 pull requests Successful merges: - #120976 (constify a couple thread_local statics) - #121683 (Fix LVI tests after frame pointers are enabled by default) - #121703 (Add a way to add constructors for `rustc_type_ir` types) - #121732 (Improve assert_matches! documentation) - #121928 (Extract an arguments struct for `Builder::then_else_break`) - #121939 (Small enhancement to description of From trait) - #121968 (Don't run test_get_os_named_thread on win7) - #121969 (`ParseSess` cleanups) - #121977 (Doc: Fix incorrect reference to integer in Atomic{Ptr,Bool}::as_ptr.) - #121994 (Update platform-support.md with supported musl version) r? `@ghost` `@rustbot` modify labels: rollup
2024-03-04Update platform-support.md with supported musl versionWesley Wiser-23/+23
2024-03-04Auto merge of #120468 - alexcrichton:start-wasm32-wasi-rename, r=wesleywiserbors-1/+123
Add a new `wasm32-wasip1` target to rustc This commit adds a new target called `wasm32-wasip1` to rustc. This new target is explained in these two MCPs: * https://github.com/rust-lang/compiler-team/issues/607 * https://github.com/rust-lang/compiler-team/issues/695 In short, the previous `wasm32-wasi` target is going to be renamed to `wasm32-wasip1` to better live alongside the [new `wasm32-wasip2` target](https://github.com/rust-lang/rust/pull/119616). This new target is added alongside the `wasm32-wasi` target and has the exact same definition as the previous target. This PR is effectively a rename of `wasm32-wasi` to `wasm32-wasip1`. Note, however, that as explained in rust-lang/compiler-team#695 the previous `wasm32-wasi` target is not being removed at this time. This change will reach stable Rust before even a warning about the rename will be printed. At this time this change is just the start where a new target is introduced and users can start migrating if they support only Nightly for example.
2024-03-04Add a scheme for moving away from `extern "rust-intrinsic"` entirelyOli Scherer-1/+12
2024-03-04Auto merge of #120585 - Amanieu:ohos-tier2, r=Kobzolbors-4/+5
Promote OpenHarmony targets to tier 2 MCP: rust-lang/compiler-team#719
2024-03-02Promote OpenHarmony targets to tier 2Amanieu d'Antras-4/+5
MCP: rust-lang/compiler-team#719
2024-03-02Add a new `wasm32-wasip1` target to rustcAlex Crichton-1/+123
This commit adds a new target called `wasm32-wasip1` to rustc. This new target is explained in these two MCPs: * https://github.com/rust-lang/compiler-team/issues/607 * https://github.com/rust-lang/compiler-team/issues/695 In short, the previous `wasm32-wasi` target is going to be renamed to `wasm32-wasip1` to better live alongside the [new `wasm32-wasip2` target](https://github.com/rust-lang/rust/pull/119616). This new target is added alongside the `wasm32-wasi` target and has the exact same definition as the previous target. This PR is effectively a rename of `wasm32-wasi` to `wasm32-wasip1`. Note, however, that as explained in rust-lang/compiler-team#695 the previous `wasm32-wasi` target is not being removed at this time. This change will reach stable Rust before even a warning about the rename will be printed. At this time this change is just the start where a new target is introduced and users can start migrating if they support only Nightly for example.
2024-03-01Add initial support for DataFlowSanitizerRamon de C Valle-4/+30
Adds initial support for DataFlowSanitizer to the Rust compiler. It currently supports `-Zsanitizer-dataflow-abilist`. Additional options for it can be passed to LLVM command line argument processor via LLVM arguments using `llvm-args` codegen option (e.g., `-Cllvm-args=-dfsan-combine-pointer-labels-on-load=false`).
2024-02-29Rollup merge of #121798 - AaronChen0:master, r=NilstriebMatthias Krüger-2/+2
Fix links in rustc doc
2024-02-29Rollup merge of #121412 - androm3da:bcain/update_hex_docs_03, r=AmanieuGuillaume Gomez-5/+121
platform docs: clarify hexagon-unknown-none-elf example, add hexagon-unknown-linux-musl
2024-02-29Fix links in rustc docAaron Chen-2/+2
2024-02-28Add a platform doc for hexagon-unknown-linux-muslBrian Cain-1/+104
2024-02-28Clarify the usage example for hexagon-unknown-none-elfBrian Cain-4/+17
The C wrapper program represents a typical use case (linking C libraries with Rust libraries) but it was not made explicit how this was supposed to work in the usage example. Also: correct a table alignment error for hexagon-unknown-none-elf on the general platform support doc.
2024-02-27Rename wasm32-wasi-preview2 to wasm32-wasip2Ryan Levick-5/+5
Signed-off-by: Ryan Levick <me@ryanlevick.com>
2024-02-27Add the wasm32-wasi-preview2 targetRyan Levick-0/+32
Signed-off-by: Ryan Levick <me@ryanlevick.com>
2024-02-26Update booksrustbot-0/+0
2024-02-23remove repetitive wordscui fliter-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2024-02-22Rollup merge of #121452 - jonathanpallant:patch-1, r=AmanieuMatthias Krüger-0/+2
Add new maintainers to nto-qnx.md [Ferrous Systems](https://ferrous-systems.com) are volunteering myself and `@japaric` as co-maintainers of the QNX targets.
2024-02-22Add new maintainers to nto-qnx.mdJonathan Pallant-0/+2
Ferrous Systems are volunteering myself and Jorge as co-maintainers of the QNX targets.
2024-02-22Auto merge of #121309 - Nilstrieb:inline-all-the-fallbacks, r=oli-obkbors-0/+2
Make intrinsic fallback bodies cross-crate inlineable This change was prompted by the stage1 compiler spending 4% of its time when compiling the polymorphic-recursion MIR opt test in `unlikely`. Intrinsic fallback bodies like `unlikely` should always be inlined, it's very silly if they are not. To do this, we enable the fallback bodies to be cross-crate inlineable. Not that this matters for our workloads since the compiler never actually _uses_ the "fallback bodies", it just uses whatever was cfg(bootstrap)ped, so I've also added `#[inline]` to those. See the comments for more information. r? oli-obk
2024-02-19Separate testing and production sanitizersOli Iliffe-15/+29
2024-02-19Make intrinsic fallback bodies cross-crate inlineableNilstrieb-0/+2
This change was prompted by the stage1 compiler spending 4% of its time when compiling the polymorphic-recursion MIR opt test in `unlikely`. Intrinsic fallback bodies like `unlikely` should always be inlined, it's very silly if they are not. To do this, we enable the fallback bodies to be cross-crate inlineable. Not that this matters for our workloads since the compiler never actually _uses_ the "fallback bodies", it just uses whatever was cfg(bootstrap)ped, so I've also added `#[inline]` to those.
2024-02-16Rollup merge of #121137 - GuillaumeGomez:add-clippy-cfg, r=Urgau,NilstriebGuillaume Gomez-1/+2
Add clippy into the known `cfg` list In clippy, we are removing the `feature = "cargo-clippy"` cfg to replace it with `clippy` in https://github.com/rust-lang/rust-clippy/pull/12292. But for it to work, we need to declare `clippy` as cfg. It makes it more coherent with other existing tools like rustdoc. cc `@flip1995`
2024-02-16Auto merge of #120500 - oli-obk:intrinsics2.0, r=WaffleLapkinbors-2/+50
Implement intrinsics with fallback bodies fixes #93145 (though we can port many more intrinsics) cc #63585 The way this works is that the backend logic for generating custom code for intrinsics has been made fallible. The only failure path is "this intrinsic is unknown". The `Instance` (that was `InstanceDef::Intrinsic`) then gets converted to `InstanceDef::Item`, which represents the fallback body. A regular function call to that body is then codegenned. This is currently implemented for * codegen_ssa (so llvm and gcc) * codegen_cranelift other backends will need to adjust, but they can just keep doing what they were doing if they prefer (though adding new intrinsics to the compiler will then require them to implement them, instead of getting the fallback body). cc `@scottmcm` `@WaffleLapkin` ### todo * [ ] miri support * [x] default intrinsic name to name of function instead of requiring it to be specified in attribute * [x] make sure that the bodies are always available (must be collected for metadata)
2024-02-15Update rust book cfg chapterGuillaume Gomez-1/+2
2024-02-13Rollup merge of #121021 - GuillaumeGomez:extend-intra-doc-link-chapter, ↵Matthias Krüger-0/+18
r=notriddle Extend intra-doc link chapter in the rustdoc book Linked to #117178. r? `@notriddle`
2024-02-13Rollup merge of #120548 - GuillaumeGomez:glob-reexport-cfg-merge, ↵Matthias Krüger-0/+29
r=GuillaumeGomez rustdoc: Fix handling of doc_auto_cfg feature for cfg attributes on glob reexport This is a follow-up of #120501 and a part of https://github.com/rust-lang/rust/issues/120487. r? `@notriddle`
2024-02-13Rollup merge of #114877 - tshepang:patch-1, r=Dylan-DPCMatthias Krüger-0/+1
unstable-book: add quick-edit link
2024-02-13Extend intra-doc link chapter in the rustdoc bookGuillaume Gomez-0/+18
2024-02-12Update booksrustbot-0/+0
2024-02-12Implement intrinsics with fallback bodiesOli Scherer-2/+50
2024-02-11Rollup merge of #120937 - ian-h-chamberlain:docs/update-3ds-links-and-info, ↵Matthias Krüger-14/+12
r=JohnTitor [docs] Update armv6k-nintendo-3ds platform docs for outdated info Mostly just fixing links and references to renamed crates, but also updating a bit of outdated info as well. CC `@Meziu` `@AzureMarker`
2024-02-11Update links to rust3ds and outdated infoIan Chamberlain-14/+12
2024-02-11Rollup merge of #120307 - djc:duration-constructors, r=Mark-SimulacrumMatthias Krüger-0/+9
core: add Duration constructors Add more `Duration` constructors. Tracking issue: #120301. These match similar convenience constructors available on both `chrono::Duration` and `time::Duration`. What's the best ordering for these with respect to the existing constructors?
2024-02-07Rollup merge of #119162 - heiher:direct-access-external-data, r=petrochenkovGuillaume Boisseau-0/+16
Add unstable `-Z direct-access-external-data` cmdline flag for `rustc` The new flag has been described in the Major Change Proposal at https://github.com/rust-lang/compiler-team/issues/707 Fixes #118053
2024-02-07Rollup merge of #110482 - chrisnc:armv8r-target, r=wesleywiserGuillaume Boisseau-0/+43
Add armv8r-none-eabihf target for the Cortex-R52.
2024-02-06Document `async_fn_traits`Oli Scherer-0/+13
2024-02-05Update src/doc/rustc/src/platform-support.mdWesley Wiser-1/+1
2024-02-04Add an `armv8r-none-eabihf` target to support the Cortex-R52.Chris Copeland-0/+43
2024-02-01Extend "Attributes" section in the `re-exports` pageGuillaume Gomez-0/+29
2024-01-31Correct paths for hexagon-unknown-none-elf platform docBrian Cain-8/+9
Update the library paths to correctly refer to libdemo{1,2}_hexagon and switch to the release build instead. Update references to libstandalone to the specific G0/PIC archive instead.
2024-01-30Rollup merge of #120434 - fmease:revert-speeder, r=petrochenkovGuillaume Gomez-32/+0
Revert outdated version of "Add the wasm32-wasi-preview2 target" An outdated version of #119616 was merged in rollup #120309. This reverts those changes to enable #119616 to “retain the intended diff” after a rebase. ```@rylev``` has agreed that this would be the cleanest approach with respect to the history. Unblocks #119616. r? ```@petrochenkov``` or compiler or libs
2024-01-29Update booksrustbot-0/+0
2024-01-28Revert "Add the wasm32-wasi-preview2 target"León Orell Valerian Liehr-32/+0
This reverts commit 31ecf341250a889ac1154b2cbe3f0b97f9d008c1. Co-authored-by: Ryan Levick <me@ryanlevick.com>
2024-01-26Rollup merge of #120356 - mbrubeck:patch-2, r=ehussMatthias Krüger-0/+1
Fix broken markdown in csky-unknown-linux-gnuabiv2.md
2024-01-24Rollup merge of #119616 - rylev:wasm32-wasi-preview2, r=petrochenkov,m-ou-seLeón Orell Valerian Liehr-0/+32
Add a new `wasm32-wasi-preview2` target This is the initial implementation of the MCP https://github.com/rust-lang/compiler-team/issues/694 creating a new tier 3 target `wasm32-wasi-preview2`. That MCP has been seconded and will most likely be approved in a little over a week from now. For more information on the need for this target, please read the [MCP](https://github.com/rust-lang/compiler-team/issues/694). There is one aspect of this PR that will become insta-stable once these changes reach a stable compiler: * A new `target_family` named `wasi` is introduced. This target family incorporates all wasi targets including `wasm32-wasi` and its derivative `wasm32-wasi-preview1-threads`. The difference between `target_family = wasi` and `target_os = wasi` will become much clearer when `wasm32-wasi` is renamed to `wasm32-wasi-preview1` and the `target_os` becomes `wasm32-wasi-preview1`. You can read about this target rename in [this MCP](https://github.com/rust-lang/compiler-team/issues/695) which has also been seconded and will hopefully be officially approved soon. Additional technical details include: * Both `std::sys::wasi_preview2` and `std::os::wasi_preview2` have been created and mostly use `#[path]` annotations on their submodules to reach into the existing `wasi` (soon to be `wasi_preview1`) modules. Over time the differences between `wasi_preview1` and `wasi_preview2` will grow and most like all `#[path]` based module aliases will fall away. * Building `wasi-preview2` relies on a [`wasi-sdk`](https://github.com/WebAssembly/wasi-sdk) in the same way that `wasi-preview1` does (one must include a `wasi-root` path in the `Config.toml` pointing to sysroot included in the wasi-sdk). The target should build against [wasi-sdk v21](https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-21) without modifications. However, the wasi-sdk itself is growing [preview2 support](https://github.com/WebAssembly/wasi-sdk/pull/370) so this might shift rapidly. We will be following along quickly to make sure that building the target remains possible as the wasi-sdk changes. * This requires a [patch to libc](https://github.com/rylev/rust-libc/tree/wasm32-wasi-preview2) that we'll need to land in conjunction with this change. Until that patch lands the target won't actually build.
2024-01-24Rollup merge of #114764 - pitaj:style-delimited-expressions, r=joshtriplettLeón Orell Valerian Liehr-7/+52
[style edition 2024] Combine all delimited exprs as last argument Closes rust-lang/style-team#149 If this is merged, the rustfmt option `overflow_delimited_expr` should be enabled by default in style edition 2024. [Rendered](https://github.com/pitaj/rust/blob/style-delimited-expressions/src/doc/style-guide/src/expressions.md#combinable-expressions) r? joshtriplett
2024-01-24core: add Duration constructorsDirkjan Ochtman-0/+9
2024-01-23Add the wasm32-wasi-preview2 targetRyan Levick-0/+32
Signed-off-by: Ryan Levick <me@ryanlevick.com>