mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-28 15:41:10 +00:00
fix: fix broken dogfood tests
This commit is contained in:
parent
3f00f074de
commit
747bb245e7
1 changed files with 2 additions and 2 deletions
|
@ -41,10 +41,10 @@ impl<'tcx> LateLintPass<'tcx> for UseUnwrapOr {
|
|||
// look for x.or().unwrap()
|
||||
if_chain! {
|
||||
if let ExprKind::MethodCall(path, args, unwrap_span) = expr.kind;
|
||||
if path.ident.name.as_str() == "unwrap";
|
||||
if path.ident.name == sym::unwrap;
|
||||
if let Some(caller) = args.first();
|
||||
if let ExprKind::MethodCall(caller_path, caller_args, or_span) = caller.kind;
|
||||
if caller_path.ident.name.as_str() == "or";
|
||||
if caller_path.ident.name == sym::or;
|
||||
then {
|
||||
let ty = cx.typeck_results().expr_ty(&caller_args[0]); // get type of x (we later check if it's Option or Result)
|
||||
let title;
|
||||
|
|
Loading…
Reference in a new issue