mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-18 15:08:47 +00:00
parent
9c53b1560c
commit
98dbce4fe4
2 changed files with 7 additions and 3 deletions
|
@ -366,9 +366,11 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>) {
|
||||||
reg.register_late_lint_pass(box large_enum_variant::LargeEnumVariant::new(conf.enum_variant_size_threshold));
|
reg.register_late_lint_pass(box large_enum_variant::LargeEnumVariant::new(conf.enum_variant_size_threshold));
|
||||||
reg.register_late_lint_pass(box explicit_write::Pass);
|
reg.register_late_lint_pass(box explicit_write::Pass);
|
||||||
reg.register_late_lint_pass(box needless_pass_by_value::NeedlessPassByValue);
|
reg.register_late_lint_pass(box needless_pass_by_value::NeedlessPassByValue);
|
||||||
|
|
||||||
|
let target = ®.sess.target;
|
||||||
reg.register_late_lint_pass(box trivially_copy_pass_by_ref::TriviallyCopyPassByRef::new(
|
reg.register_late_lint_pass(box trivially_copy_pass_by_ref::TriviallyCopyPassByRef::new(
|
||||||
conf.trivial_copy_size_limit,
|
conf.trivial_copy_size_limit,
|
||||||
®.sess.target,
|
target,
|
||||||
));
|
));
|
||||||
reg.register_early_lint_pass(box literal_representation::LiteralDigitGrouping);
|
reg.register_early_lint_pass(box literal_representation::LiteralDigitGrouping);
|
||||||
reg.register_early_lint_pass(box literal_representation::LiteralRepresentation::new(
|
reg.register_early_lint_pass(box literal_representation::LiteralRepresentation::new(
|
||||||
|
|
|
@ -448,7 +448,8 @@ impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
|
||||||
CaptureClause::CaptureByValue => 0,
|
CaptureClause::CaptureByValue => 0,
|
||||||
CaptureClause::CaptureByRef => 1,
|
CaptureClause::CaptureByRef => 1,
|
||||||
}.hash(&mut self.s);
|
}.hash(&mut self.s);
|
||||||
self.hash_expr(&self.cx.tcx.hir.body(eid).value);
|
let value = &self.cx.tcx.hir.body(eid).value;
|
||||||
|
self.hash_expr(value);
|
||||||
},
|
},
|
||||||
ExprKind::Field(ref e, ref f) => {
|
ExprKind::Field(ref e, ref f) => {
|
||||||
let c: fn(_, _) -> _ = ExprKind::Field;
|
let c: fn(_, _) -> _ = ExprKind::Field;
|
||||||
|
@ -515,7 +516,8 @@ impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
|
||||||
self.hash_expr(e);
|
self.hash_expr(e);
|
||||||
let full_table = self.tables;
|
let full_table = self.tables;
|
||||||
self.tables = self.cx.tcx.body_tables(l_id.body);
|
self.tables = self.cx.tcx.body_tables(l_id.body);
|
||||||
self.hash_expr(&self.cx.tcx.hir.body(l_id.body).value);
|
let value = &self.cx.tcx.hir.body(l_id.body).value;
|
||||||
|
self.hash_expr(value);
|
||||||
self.tables = full_table;
|
self.tables = full_table;
|
||||||
},
|
},
|
||||||
ExprKind::Ret(ref e) => {
|
ExprKind::Ret(ref e) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue