From 01bf35010fb76154475fb722773731073fb50fa3 Mon Sep 17 00:00:00 2001 From: Andrew Lilley Brinker Date: Wed, 9 Sep 2020 19:36:15 -0700 Subject: [PATCH] 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. --- src/doc/rustc/src/lints/listing/allowed-by-default.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/doc/rustc/src/lints/listing/allowed-by-default.md b/src/doc/rustc/src/lints/listing/allowed-by-default.md index d3dfc3197e2f6..d2d8c471efc96 100644 --- a/src/doc/rustc/src/lints/listing/allowed-by-default.md +++ b/src/doc/rustc/src/lints/listing/allowed-by-default.md @@ -232,7 +232,8 @@ error: lifetime name `'x` only used once ## trivial-casts -This lint detects trivial casts which could be removed. Some example code +This lint detects trivial casts which could be replaced with coercion, which may require +type ascription or a temporary variable. Some example code that triggers this lint: ```rust