diff options
author | Lúcás Meier <[email protected]> | 2019-10-04 10:03:35 +0100 |
---|---|---|
committer | Lúcás Meier <[email protected]> | 2019-10-04 10:03:46 +0100 |
commit | fe8ec1c045af7a41492d0df6d271f1ce56afb51b (patch) | |
tree | b6d42311b5d146c025e62e8275efc87b42538098 /docs/user | |
parent | e17243d69893c7bba29ea5727154cb1d521fe9c8 (diff) |
[#1807] Add entry in docs/user/features
Diffstat (limited to 'docs/user')
-rw-r--r-- | docs/user/features.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/user/features.md b/docs/user/features.md index eb81cba26..f89d8c489 100644 --- a/docs/user/features.md +++ b/docs/user/features.md | |||
@@ -166,6 +166,20 @@ impl Foo for S { | |||
166 | } | 166 | } |
167 | ``` | 167 | ``` |
168 | 168 | ||
169 | - Apply [De Morgan's law](https://en.wikipedia.org/wiki/De_Morgan%27s_laws) | ||
170 | |||
171 | ```rust | ||
172 | // before: | ||
173 | fn example(x: bool) -> bool { | ||
174 | !x || !x | ||
175 | } | ||
176 | |||
177 | // after: | ||
178 | fn example(x: bool) -> bool { | ||
179 | !(x && !x) | ||
180 | } | ||
181 | ``` | ||
182 | |||
169 | - Import path | 183 | - Import path |
170 | 184 | ||
171 | ```rust | 185 | ```rust |