1
Fork 0

Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obk

don't destuct references just to reborrow
This commit is contained in:
Matthias Krüger 2022-12-18 18:57:05 +01:00 committed by GitHub
commit 22379779b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 41 additions and 42 deletions

View file

@ -200,7 +200,7 @@ impl<'tcx> ProjectionCache<'_, 'tcx> {
pub fn complete(&mut self, key: ProjectionCacheKey<'tcx>, result: EvaluationResult) {
let mut map = self.map();
match map.get(&key) {
Some(&ProjectionCacheEntry::NormalizedTy { ref ty, complete: _ }) => {
Some(ProjectionCacheEntry::NormalizedTy { ty, complete: _ }) => {
info!("ProjectionCacheEntry::complete({:?}) - completing {:?}", key, ty);
let mut ty = ty.clone();
if result.must_apply_considering_regions() {