Skip to content

Commit 1803f55

Browse files
committed
Auto merge of #140127 - ChrisDenton:rollup-2kye32h, r=ChrisDenton
Rollup of 11 pull requests Successful merges: - #134213 (Stabilize `naked_functions`) - #139711 (Hermit: Unify `std::env::args` with Unix) - #139795 (Clarify why SGX code specifies linkage/symbol names for certain statics) - #140036 (Advent of `tests/ui` (misc cleanups and improvements) [4/N]) - #140047 (remove a couple clones) - #140052 (Fix error when an intra doc link is trying to resolve an empty associated item) - #140074 (rustdoc-json: Improve test for auto-trait impls) - #140076 (jsondocck: Require command is at start of line) - #140107 (rustc-dev-guide subtree update) - #140111 (cleanup redundant pattern instances) - #140118 ({B,C}Str: minor cleanup) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 38ded57 + d67ed39 commit 1803f55

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a7c39b68616668a45f0afd62849a1da7c8ad2516
1+
b8005bff3248cfc6e327faf4fa631ac49bb49ba9

src/tests/ui.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ It should be preferred to using `error-pattern`, which is imprecise and non-exha
303303
### `error-pattern`
304304

305305
The `error-pattern` [directive](directives.md) can be used for runtime messages, which don't
306-
have a specific span, or in exceptional cases for compile time messages.
306+
have a specific span, or in exceptional cases, for compile time messages.
307307

308308
Let's think about this test:
309309

@@ -316,7 +316,7 @@ fn main() {
316316
}
317317
```
318318

319-
We want to ensure this shows "index out of bounds" but we cannot use the `ERROR`
319+
We want to ensure this shows "index out of bounds", but we cannot use the `ERROR`
320320
annotation since the runtime error doesn't have any span. Then it's time to use the
321321
`error-pattern` directive:
322322

@@ -333,18 +333,19 @@ fn main() {
333333
Use of `error-pattern` is not recommended in general.
334334

335335
For strict testing of compile time output, try to use the line annotations `//~` as much as
336-
possible, including `//~?` annotations for diagnostics without span.
336+
possible, including `//~?` annotations for diagnostics without spans.
337337

338338
If the compile time output is target dependent or too verbose, use directive
339339
`//@ dont-require-annotations: <diagnostic-kind>` to make the line annotation checking
340-
non-exhaustive, some of the compiler messages can stay uncovered by annotations in this mode.
340+
non-exhaustive.
341+
Some of the compiler messages can stay uncovered by annotations in this mode.
341342

342-
For checking runtime output `//@ check-run-results` may be preferable.
343+
For checking runtime output, `//@ check-run-results` may be preferable.
343344

344345
Only use `error-pattern` if none of the above works.
345346

346347
Line annotations `//~` are still checked in tests using `error-pattern`.
347-
In exceptional cases use `//@ compile-flags: --error-format=human` to opt out of these checks.
348+
In exceptional cases, use `//@ compile-flags: --error-format=human` to opt out of these checks.
348349

349350
### Diagnostic kinds (error levels)
350351

0 commit comments

Comments
 (0)