Skip to content

Commit 01bf350

Browse files
Reword trivial_casts lint to better explain.
The current description of the trivial casts lint under the "allowed by default" listing in the rustc book indicates the lint is for lints which may be removed, which is less clear than saying it's for lints which may be replaced by coercion (which is the wording used by the error message included in the doc). This commit changes the wording slightly to better describe what the lint does.
1 parent 97eb606 commit 01bf350

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/doc/rustc/src/lints/listing/allowed-by-default.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ error: lifetime name `'x` only used once
232232

233233
## trivial-casts
234234

235-
This lint detects trivial casts which could be removed. Some example code
235+
This lint detects trivial casts which could be replaced with coercion, which may require
236+
type ascription or a temporary variable. Some example code
236237
that triggers this lint:
237238

238239
```rust

0 commit comments

Comments
 (0)