File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- a31c27a887b40df16ab9dfb8c9f7924636092509
1+ c58275e0369d09fc3959b8ba87dcbcbe73797465
Original file line number Diff line number Diff line change @@ -1018,12 +1018,13 @@ pub trait From<T>: Sized {
10181018### Formatting
10191019
10201020The string literals are format strings that accept parameters wrapped in braces
1021- but positional and listed parameters and format specifiers are not accepted.
1021+ but positional and listed parameters are not accepted.
10221022The following parameter names are valid:
10231023- ` Self ` and all generic parameters of the trait.
10241024- ` This ` : the name of the trait the attribute is on, without generics.
1025- - ` Trait ` : the name of the "sugared" trait.
1026- See ` TraitRefPrintSugared ` .
1025+ - ` This:path ` : the full path of the trait the attribute is on, with unresolved generics.
1026+ - ` This:resolved ` : the full path of the trait the attribute is on, with resolved generics.
1027+ Additionally, this will "sugar" the ` Fn(...) ` traits.
10271028- ` ItemContext ` : the kind of ` hir::Node ` we're in, things like ` "an async block" ` ,
10281029 ` "a function" ` , ` "an async function" ` , etc.
10291030
Original file line number Diff line number Diff line change @@ -346,17 +346,6 @@ See also the [codegen tests](#codegen-tests) for a similar set of tests.
346346If you need to work with ` #![no_std] ` cross-compiling tests, consult the
347347[ ` minicore ` test auxiliary] ( ./minicore.md ) chapter.
348348
349- #### Conditional assembly tests based on instruction support
350-
351- Tests that depend on specific assembly instructions being available can use the
352- ` //@ needs-asm-mnemonic: <MNEMONIC> ` directive.
353- This will skip the test if the target backend does not support the specified instruction mnemonic.
354-
355- For example, a test that requires the ` RET ` instruction:
356- ``` rust,ignore
357- //@ needs-asm-mnemonic: RET
358- ```
359-
360349[ `tests/assembly-llvm` ] : https://github.com/rust-lang/rust/tree/HEAD/tests/assembly-llvm
361350
362351
Original file line number Diff line number Diff line change @@ -164,9 +164,10 @@ The following directives will check rustc build settings and target settings:
164164 For tests that cross-compile to explicit targets
165165 via ` --target ` , use ` needs-llvm-components ` instead to ensure the appropriate
166166 backend is available.
167- - ` needs-asm-mnemonic: <MNEMONIC> ` — ignores if the target backend does not
168- support the specified assembly mnemonic (e.g., ` RET ` , ` NOP ` ).
169- Only supported with the LLVM backend.
167+ - ` needs-asm-ret ` - ignores if the target does not have a ` ret ` instruction
168+ in its assembly syntax. Most target architectures have this instruction,
169+ making it handy for portable inline-assembly tests, but some architectures
170+ (e.g. 32-bit ARM) do not have it.
170171- ` needs-profiler-runtime ` — ignores the test if the profiler runtime was not
171172 enabled for the target (` build.profiler = true ` in ` bootstrap.toml ` )
172173- ` needs-sanitizer-support ` — ignores if the sanitizer support was not enabled
You can’t perform that action at this time.
0 commit comments