Skip to content

Commit 087dabf

Browse files
Sprinkle breadcrumbs around to lead people to the rust-invalid ABI
1 parent 78652b7 commit 087dabf

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/doc/rustc-dev-guide/src/tests/ui.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ The output is normalized to ignore unwanted differences, see the
5959
[Normalization](#normalization) section. If the file is missing, then
6060
compiletest expects the corresponding output to be empty.
6161

62+
A common reason to use normalization, revisions, and most of the other following tools,
63+
is to account for platform differences. Consider alternatives to these tools, like
64+
e.g. using the `extern "rust-invalid"` ABI that is invalid on every platform
65+
instead of fixing the test to use cross-compilation and testing every possibly-invalid ABI.
66+
6267
There can be multiple stdout/stderr files. The general form is:
6368

6469
```text

tests/ui/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ For now, only immediate subdirectories under `tests/ui/` are described, but thes
88

99
These tests deal with *Application Binary Interfaces* (ABI), mostly relating to function name mangling (and the `#[no_mangle]` attribute), calling conventions, or compiler flags which affect ABI.
1010

11+
Tests for unsupported ABIs can be made cross-platform by using the `extern "rust-invalid"` ABI, which is considered unsupported on every platform.
12+
1113
## `tests/ui/allocator`
1214

1315
These tests exercise `#![feature(allocator_api)]` and the `#[global_allocator]` attribute.

0 commit comments

Comments
 (0)