Skip to content

Commit 3d5438a

Browse files
Fix binding mode problems
1 parent e1819a8 commit 3d5438a

File tree

67 files changed

+154
-181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+154
-181
lines changed

compiler/rustc_abi/src/lib.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -329,19 +329,19 @@ impl TargetDataLayout {
329329
[p] if p.starts_with('P') => {
330330
dl.instruction_address_space = parse_address_space(&p[1..], "P")?
331331
}
332-
["a", ref a @ ..] => dl.aggregate_align = parse_align(a, "a")?,
333-
["f16", ref a @ ..] => dl.f16_align = parse_align(a, "f16")?,
334-
["f32", ref a @ ..] => dl.f32_align = parse_align(a, "f32")?,
335-
["f64", ref a @ ..] => dl.f64_align = parse_align(a, "f64")?,
336-
["f128", ref a @ ..] => dl.f128_align = parse_align(a, "f128")?,
332+
["a", a @ ..] => dl.aggregate_align = parse_align(a, "a")?,
333+
["f16", a @ ..] => dl.f16_align = parse_align(a, "f16")?,
334+
["f32", a @ ..] => dl.f32_align = parse_align(a, "f32")?,
335+
["f64", a @ ..] => dl.f64_align = parse_align(a, "f64")?,
336+
["f128", a @ ..] => dl.f128_align = parse_align(a, "f128")?,
337337
// FIXME(erikdesjardins): we should be parsing nonzero address spaces
338338
// this will require replacing TargetDataLayout::{pointer_size,pointer_align}
339339
// with e.g. `fn pointer_size_in(AddressSpace)`
340-
[p @ "p", s, ref a @ ..] | [p @ "p0", s, ref a @ ..] => {
340+
[p @ "p", s, a @ ..] | [p @ "p0", s, a @ ..] => {
341341
dl.pointer_size = parse_size(s, p)?;
342342
dl.pointer_align = parse_align(a, p)?;
343343
}
344-
[s, ref a @ ..] if s.starts_with('i') => {
344+
[s, a @ ..] if s.starts_with('i') => {
345345
let Ok(bits) = s[1..].parse::<u64>() else {
346346
parse_size(&s[1..], "i")?; // For the user error.
347347
continue;
@@ -362,7 +362,7 @@ impl TargetDataLayout {
362362
dl.i128_align = a;
363363
}
364364
}
365-
[s, ref a @ ..] if s.starts_with('v') => {
365+
[s, a @ ..] if s.starts_with('v') => {
366366
let v_size = parse_size(&s[1..], "v")?;
367367
let a = parse_align(a, s)?;
368368
if let Some(v) = dl.vector_align.iter_mut().find(|v| v.0 == v_size) {
@@ -1802,7 +1802,7 @@ where
18021802
variants,
18031803
max_repr_align,
18041804
unadjusted_abi_align,
1805-
ref randomization_seed,
1805+
randomization_seed,
18061806
} = self;
18071807
f.debug_struct("Layout")
18081808
.field("size", size)

compiler/rustc_ast/src/visit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ pub fn walk_use_tree<'a, V: Visitor<'a>>(
597597
visit_opt!(visitor, visit_ident, rename);
598598
}
599599
UseTreeKind::Glob => {}
600-
UseTreeKind::Nested { ref items, span: _ } => {
600+
UseTreeKind::Nested { items, span: _ } => {
601601
for &(ref nested_tree, nested_id) in items {
602602
try_visit!(visitor.visit_use_tree(nested_tree, nested_id, true));
603603
}

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2617,7 +2617,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
26172617
if let hir::Pat { kind: hir::PatKind::Binding(_, hir_id, _ident, _), .. } =
26182618
local.pat
26192619
&& let Some(init) = local.init
2620-
&& let hir::Expr {
2620+
&& let &hir::Expr {
26212621
kind:
26222622
hir::ExprKind::Closure(&hir::Closure {
26232623
kind: hir::ClosureKind::Closure,

compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ impl<'tcx> BorrowExplanation<'tcx> {
262262
fn visit_expr(&mut self, expr: &'hir hir::Expr<'hir>) {
263263
if let hir::ExprKind::If(cond, _conseq, _alt)
264264
| hir::ExprKind::Loop(
265-
hir::Block {
265+
&hir::Block {
266266
expr:
267267
Some(&hir::Expr {
268268
kind: hir::ExprKind::If(cond, _conseq, _alt),

compiler/rustc_borrowck/src/diagnostics/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
11261126
let hir_id = self.infcx.tcx.local_def_id_to_hir_id(def_id);
11271127
let expr = &self.infcx.tcx.hir().expect_expr(hir_id).kind;
11281128
debug!("closure_span: hir_id={:?} expr={:?}", hir_id, expr);
1129-
if let hir::ExprKind::Closure(&hir::Closure { kind, fn_decl_span, .. }) = expr {
1129+
if let &hir::ExprKind::Closure(&hir::Closure { kind, fn_decl_span, .. }) = expr {
11301130
for (captured_place, place) in
11311131
self.infcx.tcx.closure_captures(def_id).iter().zip(places)
11321132
{

compiler/rustc_borrowck/src/diagnostics/region_name.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
681681
let mir_hir_id = self.mir_hir_id();
682682

683683
let (return_span, mir_description, hir_ty) = match tcx.hir_node(mir_hir_id) {
684-
hir::Node::Expr(hir::Expr {
684+
hir::Node::Expr(&hir::Expr {
685685
kind: hir::ExprKind::Closure(&hir::Closure { fn_decl, kind, fn_decl_span, .. }),
686686
..
687687
}) => {
@@ -873,7 +873,7 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
873873
.name;
874874

875875
let yield_span = match tcx.hir_node(self.mir_hir_id()) {
876-
hir::Node::Expr(hir::Expr {
876+
hir::Node::Expr(&hir::Expr {
877877
kind: hir::ExprKind::Closure(&hir::Closure { fn_decl_span, .. }),
878878
..
879879
}) => tcx.sess.source_map().end_point(fn_decl_span),

compiler/rustc_codegen_ssa/src/back/symbol_export.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ fn exported_symbols_provider_local(
183183
});
184184

185185
let mut symbols: Vec<_> =
186-
sorted.iter().map(|(&def_id, &info)| (ExportedSymbol::NonGeneric(def_id), info)).collect();
186+
sorted.iter().map(|&(&def_id, &info)| (ExportedSymbol::NonGeneric(def_id), info)).collect();
187187

188188
// Export TLS shims
189189
if !tcx.sess.target.dll_tls_export {
190-
symbols.extend(sorted.iter().filter_map(|(&def_id, &info)| {
190+
symbols.extend(sorted.iter().filter_map(|&(&def_id, &info)| {
191191
tcx.needs_thread_local_shim(def_id).then(|| {
192192
(
193193
ExportedSymbol::ThreadLocalShim(def_id),

compiler/rustc_codegen_ssa/src/codegen_attrs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ fn autodiff_attrs(tcx: TyCtxt<'_>, id: DefId) -> Option<AutoDiffAttrs> {
894894
let [mode, input_activities @ .., ret_activity] = &list[..] else {
895895
span_bug!(attr.span, "rustc_autodiff attribute must contain mode and activities");
896896
};
897-
let mode = if let MetaItemInner::MetaItem(MetaItem { path: ref p1, .. }) = mode {
897+
let mode = if let MetaItemInner::MetaItem(MetaItem { path: p1, .. }) = mode {
898898
p1.segments.first().unwrap().ident
899899
} else {
900900
span_bug!(attr.span, "rustc_autodiff attribute must contain mode");
@@ -910,7 +910,7 @@ fn autodiff_attrs(tcx: TyCtxt<'_>, id: DefId) -> Option<AutoDiffAttrs> {
910910
};
911911

912912
// First read the ret symbol from the attribute
913-
let ret_symbol = if let MetaItemInner::MetaItem(MetaItem { path: ref p1, .. }) = ret_activity {
913+
let ret_symbol = if let MetaItemInner::MetaItem(MetaItem { path: p1, .. }) = ret_activity {
914914
p1.segments.first().unwrap().ident
915915
} else {
916916
span_bug!(attr.span, "rustc_autodiff attribute must contain the return activity");
@@ -924,7 +924,7 @@ fn autodiff_attrs(tcx: TyCtxt<'_>, id: DefId) -> Option<AutoDiffAttrs> {
924924
// Now parse all the intermediate (input) activities
925925
let mut arg_activities: Vec<DiffActivity> = vec![];
926926
for arg in input_activities {
927-
let arg_symbol = if let MetaItemInner::MetaItem(MetaItem { path: ref p2, .. }) = arg {
927+
let arg_symbol = if let MetaItemInner::MetaItem(MetaItem { path: p2, .. }) = arg {
928928
match p2.segments.first() {
929929
Some(x) => x.ident,
930930
None => {

compiler/rustc_codegen_ssa/src/mir/block.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -720,14 +720,14 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
720720

721721
// Put together the arguments to the panic entry point.
722722
let (lang_item, args) = match msg {
723-
AssertKind::BoundsCheck { ref len, ref index } => {
723+
AssertKind::BoundsCheck { len, index } => {
724724
let len = self.codegen_operand(bx, len).immediate();
725725
let index = self.codegen_operand(bx, index).immediate();
726726
// It's `fn panic_bounds_check(index: usize, len: usize)`,
727727
// and `#[track_caller]` adds an implicit third argument.
728728
(LangItem::PanicBoundsCheck, vec![index, len, location])
729729
}
730-
AssertKind::MisalignedPointerDereference { ref required, ref found } => {
730+
AssertKind::MisalignedPointerDereference { required, found } => {
731731
let required = self.codegen_operand(bx, required).immediate();
732732
let found = self.codegen_operand(bx, found).immediate();
733733
// It's `fn panic_misaligned_pointer_dereference(required: usize, found: usize)`,

compiler/rustc_codegen_ssa/src/mir/operand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
584584
// Moves out of scalar and scalar pair fields are trivial.
585585
for elem in place_ref.projection.iter() {
586586
match elem {
587-
mir::ProjectionElem::Field(ref f, _) => {
587+
mir::ProjectionElem::Field(f, _) => {
588588
assert!(
589589
!o.layout.ty.is_any_ptr(),
590590
"Bad PlaceRef: destructing pointers should use cast/PtrMetadata, \

compiler/rustc_const_eval/src/const_eval/machine.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -502,12 +502,10 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
502502
RemainderByZero(op) => RemainderByZero(eval_to_int(op)?),
503503
ResumedAfterReturn(coroutine_kind) => ResumedAfterReturn(*coroutine_kind),
504504
ResumedAfterPanic(coroutine_kind) => ResumedAfterPanic(*coroutine_kind),
505-
MisalignedPointerDereference { ref required, ref found } => {
506-
MisalignedPointerDereference {
507-
required: eval_to_int(required)?,
508-
found: eval_to_int(found)?,
509-
}
510-
}
505+
MisalignedPointerDereference { required, found } => MisalignedPointerDereference {
506+
required: eval_to_int(required)?,
507+
found: eval_to_int(found)?,
508+
},
511509
NullPointerDereference => NullPointerDereference,
512510
};
513511
Err(ConstEvalErrKind::AssertFailure(err)).into()

compiler/rustc_data_structures/src/sorted_map/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn test_sorted_index_multi_map() {
2424
// `get_by_key` returns items in insertion order.
2525
let twos: Vec<_> = set.get_by_key_enumerated(2).collect();
2626
let idxs: Vec<usize> = twos.iter().map(|(i, _)| *i).collect();
27-
let values: Vec<usize> = twos.iter().map(|(_, &v)| v).collect();
27+
let values: Vec<usize> = twos.iter().map(|&(_, &v)| v).collect();
2828

2929
assert_eq!(idxs, vec![0, 2, 4]);
3030
assert_eq!(values, vec![0, 1, 2]);

compiler/rustc_expand/src/mbe/transcribe.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ pub(super) fn transcribe<'a>(
255255
}
256256

257257
// Replace the meta-var with the matched token tree from the invocation.
258-
mbe::TokenTree::MetaVar(mut sp, mut original_ident) => {
258+
&mbe::TokenTree::MetaVar(mut sp, mut original_ident) => {
259259
// Find the matched nonterminal from the macro invocation, and use it to replace
260260
// the meta-var.
261261
//
@@ -339,7 +339,7 @@ pub(super) fn transcribe<'a>(
339339
// We will produce all of the results of the inside of the `Delimited` and then we will
340340
// jump back out of the Delimited, pop the result_stack and add the new results back to
341341
// the previous results (from outside the Delimited).
342-
mbe::TokenTree::Delimited(mut span, spacing, delimited) => {
342+
&mbe::TokenTree::Delimited(mut span, ref spacing, ref delimited) => {
343343
mut_visit::visit_delim_span(&mut marker, &mut span);
344344
stack.push(Frame::new_delimited(delimited, span, *spacing));
345345
result_stack.push(mem::take(&mut result));

compiler/rustc_hir/src/hir/tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ macro_rules! define_tests {
99
let unambig = $kind::$variant::<'_, ()> { $($init)* };
1010
let unambig_to_ambig = unsafe { std::mem::transmute::<_, $kind<'_, AmbigArg>>(unambig) };
1111

12-
assert!(matches!(&unambig_to_ambig, $kind::$variant { $($init)* }));
12+
assert!(matches!(&unambig_to_ambig, &$kind::$variant { $($init)* }));
1313

1414
let ambig_to_unambig = unsafe { std::mem::transmute::<_, $kind<'_, ()>>(unambig_to_ambig) };
1515

16-
assert!(matches!(&ambig_to_unambig, $kind::$variant { $($init)* }));
16+
assert!(matches!(&ambig_to_unambig, &$kind::$variant { $($init)* }));
1717
}
1818
)*};
1919
}

compiler/rustc_hir/src/intravisit.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -593,9 +593,9 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item<'v>) -> V::
593593
defaultness: _,
594594
polarity: _,
595595
defaultness_span: _,
596-
ref generics,
597-
ref of_trait,
598-
ref self_ty,
596+
generics,
597+
of_trait,
598+
self_ty,
599599
items,
600600
}) => {
601601
try_visit!(visitor.visit_id(item.hir_id()));
@@ -1045,7 +1045,7 @@ pub fn walk_generic_param<'v, V: Visitor<'v>>(
10451045
}
10461046
GenericParamKind::Const { ref ty, ref default, synthetic: _ } => {
10471047
try_visit!(visitor.visit_ty_unambig(ty));
1048-
if let Some(ref default) = default {
1048+
if let Some(default) = default {
10491049
try_visit!(visitor.visit_const_param_default(param.hir_id, default));
10501050
}
10511051
}
@@ -1401,8 +1401,8 @@ pub fn walk_assoc_item_constraint<'v, V: Visitor<'v>>(
14011401
try_visit!(visitor.visit_generic_args(constraint.gen_args));
14021402
match constraint.kind {
14031403
AssocItemConstraintKind::Equality { ref term } => match term {
1404-
Term::Ty(ref ty) => try_visit!(visitor.visit_ty_unambig(ty)),
1405-
Term::Const(ref c) => try_visit!(visitor.visit_const_arg_unambig(c)),
1404+
Term::Ty(ty) => try_visit!(visitor.visit_ty_unambig(ty)),
1405+
Term::Const(c) => try_visit!(visitor.visit_const_arg_unambig(c)),
14061406
},
14071407
AssocItemConstraintKind::Bound { bounds } => {
14081408
walk_list!(visitor, visit_param_bound, bounds)

compiler/rustc_hir_analysis/src/collect/type_of.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fn anon_const_type_of<'tcx>(icx: &ItemCtxt<'tcx>, def_id: LocalDefId) -> Ty<'tcx
106106
}
107107
}
108108
}
109-
Node::Variant(Variant { disr_expr: Some(ref e), .. }) if e.hir_id == hir_id => {
109+
Node::Variant(Variant { disr_expr: Some(e), .. }) if e.hir_id == hir_id => {
110110
tcx.adt_def(tcx.hir_get_parent_item(hir_id)).repr().discr_type().to_ty(tcx)
111111
}
112112
// Sort of affects the type system, but only for the purpose of diagnostics

compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1226,11 +1226,10 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
12261226
adt_def.variants().iter().find(|s| s.name == variant_name)
12271227
{
12281228
let mut suggestion = vec![(assoc_ident.span, variant_name.to_string())];
1229-
if let hir::Node::Stmt(hir::Stmt {
1230-
kind: hir::StmtKind::Semi(ref expr),
1231-
..
1229+
if let hir::Node::Stmt(&hir::Stmt {
1230+
kind: hir::StmtKind::Semi(expr), ..
12321231
})
1233-
| hir::Node::Expr(ref expr) = tcx.parent_hir_node(hir_ref_id)
1232+
| hir::Node::Expr(expr) = tcx.parent_hir_node(hir_ref_id)
12341233
&& let hir::ExprKind::Struct(..) = expr.kind
12351234
{
12361235
match variant.ctor {

compiler/rustc_hir_pretty/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1856,7 +1856,7 @@ impl<'a> State<'a> {
18561856
self.word_space("=");
18571857
match term {
18581858
Term::Ty(ty) => self.print_type(ty),
1859-
Term::Const(ref c) => self.print_const_arg(c),
1859+
Term::Const(c) => self.print_const_arg(c),
18601860
}
18611861
}
18621862
hir::AssocItemConstraintKind::Bound { bounds } => {

compiler/rustc_hir_typeck/src/callee.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
346346
return;
347347
};
348348

349-
let fn_decl_span = if let hir::Node::Expr(hir::Expr {
349+
let fn_decl_span = if let hir::Node::Expr(&hir::Expr {
350350
kind: hir::ExprKind::Closure(&hir::Closure { fn_decl_span, .. }),
351351
..
352352
}) = self.tcx.parent_hir_node(hir_id)
@@ -371,7 +371,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
371371
{
372372
// Actually need to unwrap one more layer of HIR to get to
373373
// the _real_ closure...
374-
if let hir::Node::Expr(hir::Expr {
374+
if let hir::Node::Expr(&hir::Expr {
375375
kind: hir::ExprKind::Closure(&hir::Closure { fn_decl_span, .. }),
376376
..
377377
}) = self.tcx.parent_hir_node(parent_hir_id)

compiler/rustc_hir_typeck/src/coercion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1887,7 +1887,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
18871887
let parent_id = fcx.tcx.parent_hir_id(block_or_return_id);
18881888
let parent = fcx.tcx.hir_node(parent_id);
18891889
if let Some(expr) = expression
1890-
&& let hir::Node::Expr(hir::Expr {
1890+
&& let hir::Node::Expr(&hir::Expr {
18911891
kind: hir::ExprKind::Closure(&hir::Closure { body, .. }),
18921892
..
18931893
}) = parent

compiler/rustc_hir_typeck/src/demand.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
577577
let mut parent;
578578
'outer: loop {
579579
// Climb the HIR tree to see if the current `Expr` is part of a `break;` statement.
580-
let (hir::Node::Stmt(hir::Stmt { kind: hir::StmtKind::Semi(&ref p), .. })
581-
| hir::Node::Block(hir::Block { expr: Some(&ref p), .. })
582-
| hir::Node::Expr(&ref p)) = self.tcx.hir_node(parent_id)
580+
let (hir::Node::Stmt(&hir::Stmt { kind: hir::StmtKind::Semi(p), .. })
581+
| hir::Node::Block(&hir::Block { expr: Some(p), .. })
582+
| hir::Node::Expr(p)) = self.tcx.hir_node(parent_id)
583583
else {
584584
break;
585585
};
@@ -593,13 +593,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
593593
loop {
594594
// Climb the HIR tree to find the (desugared) `loop` this `break` corresponds to.
595595
let parent = match self.tcx.hir_node(parent_id) {
596-
hir::Node::Expr(&ref parent) => {
596+
hir::Node::Expr(parent) => {
597597
parent_id = self.tcx.parent_hir_id(parent.hir_id);
598598
parent
599599
}
600600
hir::Node::Stmt(hir::Stmt {
601601
hir_id,
602-
kind: hir::StmtKind::Semi(&ref parent) | hir::StmtKind::Expr(&ref parent),
602+
kind: hir::StmtKind::Semi(parent) | hir::StmtKind::Expr(parent),
603603
..
604604
}) => {
605605
parent_id = self.tcx.parent_hir_id(*hir_id);

compiler/rustc_hir_typeck/src/fallback.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ impl<'tcx> FnCtxt<'_, 'tcx> {
503503
let unit_errors = remaining_errors_if_fallback_to(self.tcx.types.unit);
504504
if unit_errors.is_empty()
505505
&& let mut never_errors = remaining_errors_if_fallback_to(self.tcx.types.never)
506-
&& let [ref mut never_error, ..] = never_errors.as_mut_slice()
506+
&& let [never_error, ..] = never_errors.as_mut_slice()
507507
{
508508
self.adjust_fulfillment_error_for_expr_obligation(never_error);
509509
let sugg = self.try_to_suggest_annotations(diverging_vids, coercions);

compiler/rustc_hir_typeck/src/method/probe.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
873873
#[instrument(level = "debug", skip(self))]
874874
fn assemble_inherent_candidates_from_object(&mut self, self_ty: Ty<'tcx>) {
875875
let principal = match self_ty.kind() {
876-
ty::Dynamic(ref data, ..) => Some(data),
876+
ty::Dynamic(data, ..) => Some(data),
877877
_ => None,
878878
}
879879
.and_then(|data| data.principal())

0 commit comments

Comments
 (0)