Add a lint for lossless casts.

This commit is contained in:
Dan Gohman
2017-08-13 14:58:17 -07:00
parent 23bc6508bb
commit 7714203c72
8 changed files with 360 additions and 100 deletions

View File

@@ -359,6 +359,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
shadow::SHADOW_UNRELATED,
strings::STRING_ADD,
strings::STRING_ADD_ASSIGN,
types::CAST_LOSSLESS,
types::CAST_POSSIBLE_TRUNCATION,
types::CAST_POSSIBLE_WRAP,
types::CAST_PRECISION_LOSS,