diff --git a/rust-version b/rust-version index 6884c82e9..0c4fc2d5f 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -a31c27a887b40df16ab9dfb8c9f7924636092509 +c58275e0369d09fc3959b8ba87dcbcbe73797465 diff --git a/src/diagnostics.md b/src/diagnostics.md index 554bcfcf8..7e3da67d8 100644 --- a/src/diagnostics.md +++ b/src/diagnostics.md @@ -1018,12 +1018,13 @@ pub trait From: Sized { ### Formatting The string literals are format strings that accept parameters wrapped in braces -but positional and listed parameters and format specifiers are not accepted. +but positional and listed parameters are not accepted. The following parameter names are valid: - `Self` and all generic parameters of the trait. - `This`: the name of the trait the attribute is on, without generics. -- `Trait`: the name of the "sugared" trait. - See `TraitRefPrintSugared`. +- `This:path`: the full path of the trait the attribute is on, with unresolved generics. +- `This:resolved`: the full path of the trait the attribute is on, with resolved generics. +Additionally, this will "sugar" the `Fn(...)` traits. - `ItemContext`: the kind of `hir::Node` we're in, things like `"an async block"`, `"a function"`, `"an async function"`, etc. diff --git a/src/tests/compiletest.md b/src/tests/compiletest.md index 7ffc9e301..36dc71a3a 100644 --- a/src/tests/compiletest.md +++ b/src/tests/compiletest.md @@ -346,17 +346,6 @@ See also the [codegen tests](#codegen-tests) for a similar set of tests. If you need to work with `#![no_std]` cross-compiling tests, consult the [`minicore` test auxiliary](./minicore.md) chapter. -#### Conditional assembly tests based on instruction support - -Tests that depend on specific assembly instructions being available can use the -`//@ needs-asm-mnemonic: ` directive. -This will skip the test if the target backend does not support the specified instruction mnemonic. - -For example, a test that requires the `RET` instruction: -```rust,ignore -//@ needs-asm-mnemonic: RET -``` - [`tests/assembly-llvm`]: https://github.com/rust-lang/rust/tree/HEAD/tests/assembly-llvm diff --git a/src/tests/directives.md b/src/tests/directives.md index d1b923edd..5dce2ad13 100644 --- a/src/tests/directives.md +++ b/src/tests/directives.md @@ -164,9 +164,10 @@ The following directives will check rustc build settings and target settings: For tests that cross-compile to explicit targets via `--target`, use `needs-llvm-components` instead to ensure the appropriate backend is available. -- `needs-asm-mnemonic: ` — ignores if the target backend does not - support the specified assembly mnemonic (e.g., `RET`, `NOP`). - Only supported with the LLVM backend. +- `needs-asm-ret` - ignores if the target does not have a `ret` instruction + in its assembly syntax. Most target architectures have this instruction, + making it handy for portable inline-assembly tests, but some architectures + (e.g. 32-bit ARM) do not have it. - `needs-profiler-runtime` — ignores the test if the profiler runtime was not enabled for the target (`build.profiler = true` in `bootstrap.toml`) - `needs-sanitizer-support` — ignores if the sanitizer support was not enabled