Warn if non-trivial work is done inside .expect
- added tests for common usages of format and as_str arguments to expect - added tests for usages of Option and Result types - given performance impact of passing non literal expressions to expect, added to perf group
This commit is contained in:
@@ -590,6 +590,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,
|
||||
@@ -899,6 +900,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,
|
||||
|
||||
Reference in New Issue
Block a user