about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2024-03-14 05:01:33 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2024-03-14 05:01:33 +0000
commit06ca3abc5ab06894fd2e15f78140eacccca3a5e9 (patch)
treeca240256a0323f4bbf16f86e7de5c1c78e47c98a /src/doc
parentf5bb34f4605bc83c02c2c0a7a128d706d6031f11 (diff)
parentac1b8575c017b6cc99cf389ceffe853d7b53a694 (diff)
downloadrust-06ca3abc5ab06894fd2e15f78140eacccca3a5e9.tar.gz
rust-06ca3abc5ab06894fd2e15f78140eacccca3a5e9.zip
Merge from rustc
Diffstat (limited to 'src/doc')
m---------src/doc/reference0
m---------src/doc/rust-by-example0
m---------src/doc/rustc-dev-guide0
-rw-r--r--src/doc/rustc/src/SUMMARY.md2
-rw-r--r--src/doc/rustc/src/instrument-coverage.md15
-rw-r--r--src/doc/rustc/src/platform-support.md12
-rw-r--r--src/doc/rustc/src/platform-support/wasm32-wasip1-threads.md (renamed from src/doc/rustc/src/platform-support/wasm32-wasi-preview1-threads.md)38
-rw-r--r--src/doc/rustc/src/platform-support/wasm32-wasip1.md2
-rw-r--r--src/doc/unstable-book/src/compiler-flags/coverage-options.md8
9 files changed, 43 insertions, 34 deletions
diff --git a/src/doc/reference b/src/doc/reference
-Subproject 3417f866932cb1c09c6be0f31d2a02ee01b4b95
+Subproject 5afb503a4c1ea3c84370f8f4c08a1cddd1cdf6a
diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example
-Subproject 57f1e708f5d5850562bc385aaf610e6af14d6ec
+Subproject e093099709456e6fd74fecd2505fdf49a2471c1
diff --git a/src/doc/rustc-dev-guide b/src/doc/rustc-dev-guide
-Subproject 7b0ef5b0bea5e3ce3b9764aa5754a60e2cc05c5
+Subproject 8a5d647f19b08998612146b1cb2ca47083db63e
diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md
index 5a0168e30cb..12a421f3c45 100644
--- a/src/doc/rustc/src/SUMMARY.md
+++ b/src/doc/rustc/src/SUMMARY.md
@@ -62,7 +62,7 @@
     - [*-unknown-openbsd](platform-support/openbsd.md)
     - [\*-unknown-uefi](platform-support/unknown-uefi.md)
     - [wasm32-wasip1](platform-support/wasm32-wasip1.md)
-    - [wasm32-wasi-preview1-threads](platform-support/wasm32-wasi-preview1-threads.md)
+    - [wasm32-wasip1-threads](platform-support/wasm32-wasip1-threads.md)
     - [wasm32-wasip2](platform-support/wasm32-wasip2.md)
     - [wasm64-unknown-unknown](platform-support/wasm64-unknown-unknown.md)
     - [\*-win7-windows-msvc](platform-support/win7-windows-msvc.md)
diff --git a/src/doc/rustc/src/instrument-coverage.md b/src/doc/rustc/src/instrument-coverage.md
index 2f93252eddc..7780f2102ba 100644
--- a/src/doc/rustc/src/instrument-coverage.md
+++ b/src/doc/rustc/src/instrument-coverage.md
@@ -346,14 +346,13 @@ $ llvm-cov report \
   more fine-grained coverage options are added.
   Using this value is currently not recommended.
 
-### Unstable values
-
-- `-Z unstable-options -C instrument-coverage=branch`:
-  Placeholder for potential branch coverage support in the future.
-- `-Z unstable-options -C instrument-coverage=except-unused-generics`:
-  Instrument all functions except unused generics.
-- `-Z unstable-options -C instrument-coverage=except-unused-functions`:
-  Instrument only used (called) functions and instantiated generic functions.
+## `-Z coverage-options=<options>`
+
+This unstable option provides finer control over some aspects of coverage
+instrumentation. Pass one or more of the following values, separated by commas.
+
+- `branch` or `no-branch`
+  - Placeholder for potential branch coverage support in the future.
 
 ## Other references
 
diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md
index 537a724579e..285c773afa2 100644
--- a/src/doc/rustc/src/platform-support.md
+++ b/src/doc/rustc/src/platform-support.md
@@ -33,12 +33,12 @@ All tier 1 targets with host tools support the full standard library.
 target | notes
 -------|-------
 `aarch64-unknown-linux-gnu` | ARM64 Linux (kernel 4.1, glibc 2.17+)
-`i686-pc-windows-gnu` | 32-bit MinGW (Windows 7+) [^windows-support] [^x86_32-floats-return-ABI]
-`i686-pc-windows-msvc` | 32-bit MSVC (Windows 7+) [^windows-support] [^x86_32-floats-return-ABI]
+`i686-pc-windows-gnu` | 32-bit MinGW (Windows 10+) [^windows-support] [^x86_32-floats-return-ABI]
+`i686-pc-windows-msvc` | 32-bit MSVC (Windows 10+) [^windows-support] [^x86_32-floats-return-ABI]
 `i686-unknown-linux-gnu` | 32-bit Linux (kernel 3.2+, glibc 2.17+) [^x86_32-floats-return-ABI]
 `x86_64-apple-darwin` | 64-bit macOS (10.12+, Sierra+)
-`x86_64-pc-windows-gnu` | 64-bit MinGW (Windows 7+) [^windows-support]
-`x86_64-pc-windows-msvc` | 64-bit MSVC (Windows 7+) [^windows-support]
+`x86_64-pc-windows-gnu` | 64-bit MinGW (Windows 10+) [^windows-support]
+`x86_64-pc-windows-msvc` | 64-bit MSVC (Windows 10+) [^windows-support]
 `x86_64-unknown-linux-gnu` | 64-bit Linux (kernel 3.2+, glibc 2.17+)
 
 [^windows-support]: Only Windows 10 currently undergoes automated testing. Earlier versions of Windows rely on testing and support from the community.
@@ -190,7 +190,7 @@ target | std | notes
 `wasm32-unknown-unknown` | ✓ | WebAssembly
 `wasm32-wasi` | ✓ | WebAssembly with WASI (undergoing a [rename to `wasm32-wasip1`][wasi-rename])
 [`wasm32-wasip1`](platform-support/wasm32-wasip1.md) | ✓ | WebAssembly with WASI
-[`wasm32-wasi-preview1-threads`](platform-support/wasm32-wasi-preview1-threads.md) | ✓ |  | WebAssembly with WASI Preview 1 and threads
+[`wasm32-wasip1-threads`](platform-support/wasm32-wasip1-threads.md) | ✓ |  | WebAssembly with WASI Preview 1 and threads
 `x86_64-apple-ios` | ✓ | 64-bit x86 iOS
 [`x86_64-fortanix-unknown-sgx`](platform-support/x86_64-fortanix-unknown-sgx.md) | ✓ | [Fortanix ABI] for 64-bit Intel SGX
 `x86_64-fuchsia` | ✓ | Alias for `x86_64-unknown-fuchsia`
@@ -292,7 +292,6 @@ target | std | host | notes
 [`i586-pc-nto-qnx700`](platform-support/nto-qnx.md) | * |  | 32-bit x86 QNX Neutrino 7.0 RTOS  [^x86_32-floats-return-ABI]
 [`i586-unknown-netbsd`](platform-support/netbsd.md) | ✓ |  | 32-bit x86, restricted to Pentium
 `i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.12+, Sierra+) [^x86_32-floats-return-ABI]
-`i686-pc-windows-msvc` | * |  | 32-bit Windows XP support [^x86_32-floats-return-ABI]
 [`i686-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ | [^x86_32-floats-return-ABI]
 `i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku [^x86_32-floats-return-ABI]
 [`i686-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 32-bit GNU/Hurd [^x86_32-floats-return-ABI]
@@ -369,7 +368,6 @@ target | std | host | notes
 [`x86_64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ |  | x86 64-bit Apple WatchOS simulator
 [`x86_64-pc-nto-qnx710`](platform-support/nto-qnx.md) | ✓ |  | x86 64-bit QNX Neutrino 7.1 RTOS |
 [`x86_64-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ |
-`x86_64-pc-windows-msvc` | * |  | 64-bit Windows XP support
 [`x86_64-unikraft-linux-musl`](platform-support/unikraft-linux-musl.md) | ✓ |   | 64-bit Unikraft with musl 1.2.3
 `x86_64-unknown-dragonfly` | ✓ | ✓ | 64-bit DragonFlyBSD
 `x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
diff --git a/src/doc/rustc/src/platform-support/wasm32-wasi-preview1-threads.md b/src/doc/rustc/src/platform-support/wasm32-wasip1-threads.md
index b719cb53aba..519e9cc7cc4 100644
--- a/src/doc/rustc/src/platform-support/wasm32-wasi-preview1-threads.md
+++ b/src/doc/rustc/src/platform-support/wasm32-wasip1-threads.md
@@ -1,12 +1,16 @@
-# `wasm32-wasi-preview1-threads`
+# `wasm32-wasip1-threads`
 
 **Tier: 2**
 
-The `wasm32-wasi-preview1-threads` target is a new and still (as of July 2023) an
-experimental target. This target is an extension to `wasm32-wasi-preview1` target,
+The `wasm32-wasip1-threads` target is a new and still (as of July 2023) an
+experimental target. This target is an extension to `wasm32-wasip1` target,
 originally known as `wasm32-wasi`. It extends the original target with a
-standardized set of syscalls that are intended to empower WebAssembly binaries with
-native multi threading capabilities.
+standardized set of syscalls that are intended to empower WebAssembly binaries
+with native multi threading capabilities.
+
+> **Note**: Prior to March 2024 this target was known as
+> `wasm32-wasi-preview1-threads`, and even longer before that it was known as
+> `wasm32-wasi-threads`.
 
 [wasi-threads]: https://github.com/WebAssembly/wasi-threads
 [threads]: https://github.com/WebAssembly/threads
@@ -26,11 +30,11 @@ This target is cross-compiled. The target supports `std` fully.
 The Rust target definition here is interesting in a few ways. We want to
 serve two use cases here with this target:
 * First, we want Rust usage of the target to be as hassle-free as possible,
-  ideally avoiding the need to configure and install a local wasm32-wasi-preview1-threads
+  ideally avoiding the need to configure and install a local wasm32-wasip1-threads
   toolchain.
 * Second, one of the primary use cases of LLVM's new wasm backend and the
   wasm support in LLD is that any compiled language can interoperate with
-  any other. The `wasm32-wasi-preview1-threads` target is the first with a viable C
+  any other. The `wasm32-wasip1-threads` target is the first with a viable C
   standard library and sysroot common definition, so we want Rust and C/C++
   code to interoperate when compiled to `wasm32-unknown-unknown`.
 
@@ -49,7 +53,7 @@ some copied crt startup object files to ensure that you can download the
 wasi target for Rust and you're off to the races, no further configuration
 necessary.
 All in all, by default, no external dependencies are required. You can
-compile `wasm32-wasi-preview1-threads` binaries straight out of the box. You can't, however,
+compile `wasm32-wasip1-threads` binaries straight out of the box. You can't, however,
 reliably interoperate with C code in this mode (yet).
 ### Interop with C required
 For the second goal we repurpose the `target-feature` flag, meaning that
@@ -59,18 +63,18 @@ you'll need to do a few things to have C/Rust code interoperate.
    not be used.
 2. If you're using rustc to build a linked artifact then you'll need to
    specify `-C linker` to a `clang` binary that supports
-   `wasm32-wasi-preview1-threads` and is configured with the `wasm32-wasi-preview1-threads` sysroot. This
+   `wasm32-wasip1-threads` and is configured with the `wasm32-wasip1-threads` sysroot. This
    will cause Rust code to be linked against the libc.a that the specified
    `clang` provides.
 3. If you're building a staticlib and integrating Rust code elsewhere, then
    compiling with `-C target-feature=-crt-static` is all you need to do.
 
 All in all, by default, no external dependencies are required. You can
-compile `wasm32-wasi-preview1-threads` binaries straight out of the box. You can't, however,
+compile `wasm32-wasip1-threads` binaries straight out of the box. You can't, however,
 reliably interoperate with C code in this mode (yet).
 
 
-Also note that at this time the `wasm32-wasi-preview1-threads` target assumes the
+Also note that at this time the `wasm32-wasip1-threads` target assumes the
 presence of other merged wasm proposals such as (with their LLVM feature flags):
 
 * [Bulk memory] - `+bulk-memory`
@@ -106,7 +110,7 @@ https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-20
 and specify path to *wasi-root* `.cargo/config.toml`
 
 ```toml
-[target.wasm32-wasi-preview1-threads]
+[target.wasm32-wasip1-threads]
 wasi-root = ".../wasi-libc/sysroot"
 ```
 
@@ -118,13 +122,13 @@ After that users can build this by adding it to the `target` list in
 From Rust Nightly 1.71.1 (2023-08-03) on the artifacts are shipped pre-compiled:
 
 ```text
-rustup target add wasm32-wasi-preview1-threads --toolchain nightly
+rustup target add wasm32-wasip1-threads --toolchain nightly
 ```
 
 Rust programs can be built for that target:
 
 ```text
-rustc --target wasm32-wasi-preview1-threads your-code.rs
+rustc --target wasm32-wasip1-threads your-code.rs
 ```
 
 ## Cross-compilation
@@ -133,7 +137,7 @@ This target can be cross-compiled from any hosts.
 
 ## Testing
 
-Currently testing is not well supported for `wasm32-wasi-preview1-threads` and the
+Currently testing is not well supported for `wasm32-wasip1-threads` and the
 Rust project doesn't run any tests for this target. However the UI testsuite can be run
 manually following this instructions:
 
@@ -141,8 +145,8 @@ manually following this instructions:
 or another engine that supports `wasi-threads` is installed and can be found in the `$PATH` env variable.
 1. Clone master branch.
 2. Apply such [a change](https://github.com/g0djan/rust/compare/godjan/wasi-threads...g0djan:rust:godjan/wasi-run-ui-tests?expand=1) with an engine from the step 1.
-3. Run `./x.py test --target wasm32-wasi-preview1-threads tests/ui` and save the list of failed tests.
+3. Run `./x.py test --target wasm32-wasip1-threads tests/ui` and save the list of failed tests.
 4. Checkout branch with your changes.
 5. Apply such [a change](https://github.com/g0djan/rust/compare/godjan/wasi-threads...g0djan:rust:godjan/wasi-run-ui-tests?expand=1) with an engine from the step 1.
-6. Run `./x.py test --target wasm32-wasi-preview1-threads tests/ui` and save the list of failed tests.
+6. Run `./x.py test --target wasm32-wasip1-threads tests/ui` and save the list of failed tests.
 7. For both lists of failed tests run `cat list | sort > sorted_list` and compare it with `diff sorted_list1 sorted_list2`.
diff --git a/src/doc/rustc/src/platform-support/wasm32-wasip1.md b/src/doc/rustc/src/platform-support/wasm32-wasip1.md
index 71f8d281bc8..a1ca81d1fec 100644
--- a/src/doc/rustc/src/platform-support/wasm32-wasip1.md
+++ b/src/doc/rustc/src/platform-support/wasm32-wasip1.md
@@ -49,7 +49,7 @@ this target are:
 
 This target is cross-compiled. The target includes support for `std` itself,
 but not all of the standard library works. For example spawning a thread will
-always return an error (see the `wasm32-wasi-preview1-threads` target for
+always return an error (see the `wasm32-wasip1-threads` target for
 example). Another example is that spawning a process will always return an
 error. Operations such as opening a file, however, will be implemented by
 calling WASI-defined APIs.
diff --git a/src/doc/unstable-book/src/compiler-flags/coverage-options.md b/src/doc/unstable-book/src/compiler-flags/coverage-options.md
new file mode 100644
index 00000000000..105dce61511
--- /dev/null
+++ b/src/doc/unstable-book/src/compiler-flags/coverage-options.md
@@ -0,0 +1,8 @@
+# `coverage-options`
+
+This option controls details of the coverage instrumentation performed by
+`-C instrument-coverage`.
+
+Multiple options can be passed, separated by commas. Valid options are:
+
+- `branch` or `no-branch`: Placeholder for future branch coverage support.