File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -530,3 +530,16 @@ run something like the following to generate the alternate stderr file:
530530```
531531
532532Currently none of the compare modes are checked in CI for UI tests.
533+
534+ ## ` rustc_* ` TEST attributes
535+
536+ The compiler defines several perma-unstable ` #[rustc_*] ` attributes gated behind the internal feature
537+ ` rustc_attrs ` that dump extra compiler-internal information. See the analogous subsection in
538+ [ compiler debugging] for more details.
539+
540+ They can be used in tests to more precisely, legibly and easily test internal compiler state in cases
541+ where it would otherwise be very hard to do the same with "user-facing" Rust alone. Indeed, one could
542+ say that this slightly abuses the term "UI" (* user* interfacing) and turns such UI tests from black-box
543+ tests into white-box ones. Use them carefully and sparingly.
544+
545+ [ compiler debugging ] : ../compiler-debugging.md#rustc_-attributes
You can’t perform that action at this time.
0 commit comments