Skip to content

Commit

Permalink
less &
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 17, 2019
1 parent f19087d commit 72d9fe8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc_lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1914,13 +1914,13 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InvalidValue {
if let hir::ExprKind::Path(ref qpath) = path_expr.node {
let def_id = cx.tables.qpath_res(qpath, path_expr.hir_id).opt_def_id()?;

if cx.match_def_path(def_id, &ZEROED_PATH) {
if cx.match_def_path(def_id, ZEROED_PATH) {
return Some(InitKind::Zeroed);
}
if cx.match_def_path(def_id, &UININIT_PATH) {
if cx.match_def_path(def_id, UININIT_PATH) {
return Some(InitKind::Uninit);
}
if cx.match_def_path(def_id, &TRANSMUTE_PATH) {
if cx.match_def_path(def_id, TRANSMUTE_PATH) {
if is_zero(&args[0]) {
return Some(InitKind::Zeroed);
}
Expand Down

0 comments on commit 72d9fe8

Please sign in to comment.