aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-15 09:48:15 +0100
committerGitHub <[email protected]>2021-06-15 09:48:15 +0100
commitfa4c851619f245b2fdd2bf9b135d5ecf5efb4bc7 (patch)
tree6543766c6134b5cbca4b0da48a2e09c32714a340 /docs
parent7d363755a27f3bc89a5c7f5d15c8664299436bb4 (diff)
parent3f4ad44082abe7256825f6fc692c1455a1eb28bb (diff)
Merge #9278
9278: internal: document that we don't #[ignore] tests r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r--docs/dev/style.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/dev/style.md b/docs/dev/style.md
index 96dd684b3..84485ea28 100644
--- a/docs/dev/style.md
+++ b/docs/dev/style.md
@@ -174,6 +174,13 @@ Instead, explicitly check for `None`, `Err`, etc.
174`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. 174`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.
175Panic messages in the logs from the `#[should_panic]` tests are confusing. 175Panic messages in the logs from the `#[should_panic]` tests are confusing.
176 176
177## `#[ignore]`
178
179Do not `#[ignore]` tests.
180If the test currently does not work, assert the wrong behavior and add a fixme explaining why it is wrong.
181
182**Rationale:** noticing when the behavior is fixed, making sure that even the wrong behavior is acceptable (ie, not a panic).
183
177## Function Preconditions 184## Function Preconditions
178 185
179Express function preconditions in types and force the caller to provide them (rather than checking in callee): 186Express function preconditions in types and force the caller to provide them (rather than checking in callee):