Skip to content

Commit e840006

Browse files
authored
Merge pull request #3085 from mikerite/revert-98dbce
Revert "Fix E0502 warnings"
2 parents 5c5f2a8 + 95fedd2 commit e840006

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

clippy_lints/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,9 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
377377
reg.register_late_lint_pass(box large_enum_variant::LargeEnumVariant::new(conf.enum_variant_size_threshold));
378378
reg.register_late_lint_pass(box explicit_write::Pass);
379379
reg.register_late_lint_pass(box needless_pass_by_value::NeedlessPassByValue);
380-
381-
let target = &reg.sess.target;
382380
reg.register_late_lint_pass(box trivially_copy_pass_by_ref::TriviallyCopyPassByRef::new(
383381
conf.trivial_copy_size_limit,
384-
target,
382+
&reg.sess.target,
385383
));
386384
reg.register_early_lint_pass(box literal_representation::LiteralDigitGrouping);
387385
reg.register_early_lint_pass(box literal_representation::LiteralRepresentation::new(

clippy_lints/src/utils/hir_utils.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,7 @@ impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
454454
CaptureClause::CaptureByValue => 0,
455455
CaptureClause::CaptureByRef => 1,
456456
}.hash(&mut self.s);
457-
let value = &self.cx.tcx.hir.body(eid).value;
458-
self.hash_expr(value);
457+
self.hash_expr(&self.cx.tcx.hir.body(eid).value);
459458
},
460459
ExprKind::Field(ref e, ref f) => {
461460
let c: fn(_, _) -> _ = ExprKind::Field;
@@ -522,8 +521,7 @@ impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
522521
self.hash_expr(e);
523522
let full_table = self.tables;
524523
self.tables = self.cx.tcx.body_tables(l_id.body);
525-
let value = &self.cx.tcx.hir.body(l_id.body).value;
526-
self.hash_expr(value);
524+
self.hash_expr(&self.cx.tcx.hir.body(l_id.body).value);
527525
self.tables = full_table;
528526
},
529527
ExprKind::Ret(ref e) => {

0 commit comments

Comments
 (0)