Merge pull request #2815 from darArch/master

Warn if non-trivial work is done inside .expect
This commit is contained in:
Oliver Schneider
2018-06-11 06:33:26 -07:00
committed by GitHub
4 changed files with 236 additions and 28 deletions

View File

@@ -592,6 +592,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
methods::OK_EXPECT,
methods::OPTION_MAP_OR_NONE,
methods::OR_FUN_CALL,
methods::EXPECT_FUN_CALL,
methods::SEARCH_IS_SOME,
methods::SHOULD_IMPLEMENT_TRAIT,
methods::SINGLE_CHAR_PATTERN,
@@ -907,6 +908,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
loops::UNUSED_COLLECT,
methods::ITER_NTH,
methods::OR_FUN_CALL,
methods::EXPECT_FUN_CALL,
methods::SINGLE_CHAR_PATTERN,
misc::CMP_OWNED,
mutex_atomic::MUTEX_ATOMIC,