Skip to content

Commit

Permalink
Add a little clarity around who is responsible for what
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Oct 12, 2024
1 parent d5c6fb1 commit 603ab3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/authoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ Tests in <https://github.com/rust-lang/rust> can be linked to rules in the refer

Tests in the `tests` directory can be annotated with the `//@ reference: x.y.z` header to link it to a rule. The header can be specified multiple times if a single file covers multiple rules.

You *should* when possible make sure every rule has a test associated with it. This is beneficial for reviewers to see the behavior and readers who may want to see examples of particular behaviors. When adding new rules, you should wait until the reference side is approved before submitting a PR to `rust-lang/rust` (to avoid churn if we decide on different names).
Compiler developers are not expected to add `reference` annotations to tests. However, if they do want to help, their cooperation is very welcome. Reference authors and editors are responsible for making sure every rule has a test associated with it.

The tests are beneficial for reviewers to see the behavior of a rule. It is also a benefit to readers who may want to see examples of particular behaviors. When adding new rules, you should wait until the reference side is approved before submitting a PR to `rust-lang/rust` (to avoid churn if we decide on different names).

Prefixed rule names should not be used in tests. That is, do not use something like `asm.rules` when there are specific rules like `asm.rules.reg-not-input`.

Expand Down

0 comments on commit 603ab3d

Please sign in to comment.