This commit is contained in:
Oliver Schneider
2017-08-15 11:10:49 +02:00
parent 3ab06c1f77
commit f3ae929b2d
27 changed files with 60 additions and 57 deletions

View File

@@ -62,7 +62,7 @@ enum MinMax {
fn min_max<'a>(cx: &LateContext, expr: &'a Expr) -> Option<(MinMax, Constant, &'a Expr)> {
if let ExprCall(ref path, ref args) = expr.node {
if let ExprPath(ref qpath) = path.node {
let def_id = cx.tables.qpath_def(qpath, path.id).def_id();
let def_id = cx.tables.qpath_def(qpath, path.hir_id).def_id();
if match_def_path(cx.tcx, def_id, &paths::CMP_MIN) {
fetch_const(cx, args, MinMax::Min)