diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-12-18 18:57:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-18 18:57:05 +0100 |
| commit | 22379779b5842c4347b966e783a09e238f32369e (patch) | |
| tree | e37159fa32666b8b760be46c6ec2f5e1d4e1d80c /compiler/rustc_const_eval | |
| parent | 8892698903645843dd508603689e4fd1add6ec7f (diff) | |
| parent | a108d55ce634b6f71462c82966b791f18136360e (diff) | |
| download | rust-22379779b5842c4347b966e783a09e238f32369e.tar.gz rust-22379779b5842c4347b966e783a09e238f32369e.zip | |
Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obk
don't destuct references just to reborrow
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/cast.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/cast.rs b/compiler/rustc_const_eval/src/interpret/cast.rs index b1fdeb01b10..986b6d65530 100644 --- a/compiler/rustc_const_eval/src/interpret/cast.rs +++ b/compiler/rustc_const_eval/src/interpret/cast.rs @@ -332,7 +332,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { Immediate::new_slice(ptr, length.eval_usize(*self.tcx, self.param_env), self); self.write_immediate(val, dest) } - (&ty::Dynamic(ref data_a, ..), &ty::Dynamic(ref data_b, ..)) => { + (ty::Dynamic(data_a, ..), ty::Dynamic(data_b, ..)) => { let val = self.read_immediate(src)?; if data_a.principal() == data_b.principal() { // A NOP cast that doesn't actually change anything, should be allowed even with mismatching vtables. |
