diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2021-06-14 22:55:05 +0300 |
|---|---|---|
| committer | Aleksey Kladov <aleksey.kladov@gmail.com> | 2021-06-15 11:46:47 +0300 |
| commit | 3f4ad44082abe7256825f6fc692c1455a1eb28bb (patch) | |
| tree | 2cd099af0420486014a40d730ac492a6686418b7 /docs/dev | |
| parent | c2015e7d182f3cb2cebe686127dd6a3e683df9e6 (diff) | |
| download | rust-3f4ad44082abe7256825f6fc692c1455a1eb28bb.tar.gz rust-3f4ad44082abe7256825f6fc692c1455a1eb28bb.zip | |
internal: document that we don't #[ignore] tests
Diffstat (limited to 'docs/dev')
| -rw-r--r-- | docs/dev/style.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/dev/style.md b/docs/dev/style.md index 96dd684b32c..84485ea2845 100644 --- a/docs/dev/style.md +++ b/docs/dev/style.md @@ -174,6 +174,13 @@ Instead, explicitly check for `None`, `Err`, etc. `rust-analyzer` is not a library, we don't need to test for API misuse, and we have to handle any user input without panics. Panic messages in the logs from the `#[should_panic]` tests are confusing. +## `#[ignore]` + +Do not `#[ignore]` tests. +If the test currently does not work, assert the wrong behavior and add a fixme explaining why it is wrong. + +**Rationale:** noticing when the behavior is fixed, making sure that even the wrong behavior is acceptable (ie, not a panic). + ## Function Preconditions Express function preconditions in types and force the caller to provide them (rather than checking in callee): |
