From 3f4ad44082abe7256825f6fc692c1455a1eb28bb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 14 Jun 2021 22:55:05 +0300 Subject: internal: document that we don't #[ignore] tests --- docs/dev/style.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/dev/style.md') 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. `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): -- cgit v1.2.3