about summary refs log tree commit diff
path: root/docs/dev
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-14 15:27:20 +0000
committerGitHub <noreply@github.com>2021-01-14 15:27:20 +0000
commit540edee3cd11d45a03abc072bb9b6f01b59bcb25 (patch)
tree7d86fca4364984808724ccc5694aef20a43d686c /docs/dev
parentaeacaeed4e49dd71ba0de30a21d9f3d1cc153cec (diff)
parent8dc68ecdfcc764c7c0dcf5fcedcb51b092d99620 (diff)
downloadrust-540edee3cd11d45a03abc072bb9b6f01b59bcb25.tar.gz
rust-540edee3cd11d45a03abc072bb9b6f01b59bcb25.zip
Merge #7270
7270: Introduce more appropriate assertion mechanism r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Diffstat (limited to 'docs/dev')
-rw-r--r--docs/dev/style.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/dev/style.md b/docs/dev/style.md
index 9859f614820..21330948ba5 100644
--- a/docs/dev/style.md
+++ b/docs/dev/style.md
@@ -215,6 +215,11 @@ if idx >= len {
 
 **Rationale:** its useful to see the invariant relied upon by the rest of the function clearly spelled out.
 
+## Assertions
+
+Assert liberally.
+Prefer `stdx::assert_never!` to standard `assert!`.
+
 ## Getters & Setters
 
 If a field can have any value without breaking invariants, make the field public.