Skip to content

Commit 4da691c

Browse files
committed
Auto merge of #4054 - matthiaskrgr:rustup_, r=Manishearth
rustup rust-lang/rust#60417 cc rust-lang/rust#60448 changelog: none
2 parents 990d683 + 24e856f commit 4da691c

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

clippy_lints/src/loops.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ fn never_loop_expr(expr: &Expr, main_loop_id: HirId) -> NeverLoopResult {
677677
| ExprKind::AddrOf(_, ref e)
678678
| ExprKind::Struct(_, _, Some(ref e))
679679
| ExprKind::Repeat(ref e, _)
680-
| ExprKind::Use(ref e) => never_loop_expr(e, main_loop_id),
680+
| ExprKind::DropTemps(ref e) => never_loop_expr(e, main_loop_id),
681681
ExprKind::Array(ref es) | ExprKind::MethodCall(_, _, ref es) | ExprKind::Tup(ref es) => {
682682
never_loop_expr_all(&mut es.iter(), main_loop_id)
683683
},

clippy_lints/src/utils/author.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ impl<'tcx> Visitor<'tcx> for PrintVisitor {
495495
ExprKind::Err => {
496496
println!("Err = {}", current);
497497
},
498-
ExprKind::Use(ref expr) => {
498+
ExprKind::DropTemps(ref expr) => {
499499
let expr_pat = self.next("expr");
500500
println!("Use(ref {}) = {};", expr_pat, current);
501501
self.current = expr_pat;

clippy_lints/src/utils/hir_utils.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl<'a, 'tcx: 'a> SpanlessEq<'a, 'tcx> {
156156
&& self.eq_block(lb, rb)
157157
&& both(ll, rl, |l, r| l.ident.as_str() == r.ident.as_str())
158158
},
159-
(&ExprKind::Use(ref le), &ExprKind::Use(ref re)) => self.eq_expr(le, re),
159+
(&ExprKind::DropTemps(ref le), &ExprKind::DropTemps(ref re)) => self.eq_expr(le, re),
160160
_ => false,
161161
}
162162
}
@@ -607,8 +607,8 @@ impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
607607
}
608608
},
609609
ExprKind::Err => {},
610-
ExprKind::Use(ref e) => {
611-
let c: fn(_) -> _ = ExprKind::Use;
610+
ExprKind::DropTemps(ref e) => {
611+
let c: fn(_) -> _ = ExprKind::DropTemps;
612612
c.hash(&mut self.s);
613613
self.hash_expr(e);
614614
},

clippy_lints/src/utils/inspector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ fn print_expr(cx: &LateContext<'_, '_>, expr: &hir::Expr, indent: usize) {
330330
hir::ExprKind::Err => {
331331
println!("{}Err", ind);
332332
},
333-
hir::ExprKind::Use(ref e) => {
333+
hir::ExprKind::DropTemps(ref e) => {
334334
println!("{}Use", ind);
335335
print_expr(cx, e, indent + 1);
336336
},

clippy_lints/src/utils/sugg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl<'a> Sugg<'a> {
115115
| hir::ExprKind::Struct(..)
116116
| hir::ExprKind::Tup(..)
117117
| hir::ExprKind::While(..)
118-
| hir::ExprKind::Use(_)
118+
| hir::ExprKind::DropTemps(_)
119119
| hir::ExprKind::Err => Sugg::NonParen(snippet),
120120
hir::ExprKind::Assign(..) => Sugg::BinOp(AssocOp::Assign, snippet),
121121
hir::ExprKind::AssignOp(op, ..) => Sugg::BinOp(hirbinop2assignop(op), snippet),

0 commit comments

Comments
 (0)