about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/autoderef.rs
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2025-08-29 10:42:44 +0200
committerlcnr <rust@lcnr.de>2025-08-29 10:53:39 +0200
commit6fd0e50ecf25e3d1ef6185a3b85dfec24e9e8cb2 (patch)
tree3c51e18a4e5d9581196ebb426c165afd7f05c1ff /compiler/rustc_hir_analysis/src/autoderef.rs
parent41f2b6b39e7526a28d50ff6918dda6de48add5e4 (diff)
downloadrust-6fd0e50ecf25e3d1ef6185a3b85dfec24e9e8cb2.tar.gz
rust-6fd0e50ecf25e3d1ef6185a3b85dfec24e9e8cb2.zip
autoderef final ty is already resolved
Diffstat (limited to 'compiler/rustc_hir_analysis/src/autoderef.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/autoderef.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/rustc_hir_analysis/src/autoderef.rs b/compiler/rustc_hir_analysis/src/autoderef.rs
index c88c534e135..e27e68d3662 100644
--- a/compiler/rustc_hir_analysis/src/autoderef.rs
+++ b/compiler/rustc_hir_analysis/src/autoderef.rs
@@ -202,14 +202,10 @@ impl<'a, 'tcx> Autoderef<'a, 'tcx> {
         Some((normalized_ty, ocx.into_pending_obligations()))
     }
 
-    /// Returns the final type we ended up with, which may be an inference
-    /// variable (we will resolve it first, if we want).
-    pub fn final_ty(&self, resolve: bool) -> Ty<'tcx> {
-        if resolve {
-            self.infcx.resolve_vars_if_possible(self.state.cur_ty)
-        } else {
-            self.state.cur_ty
-        }
+    /// Returns the final type we ended up with, which may be an unresolved
+    /// inference variable.
+    pub fn final_ty(&self) -> Ty<'tcx> {
+        self.state.cur_ty
     }
 
     pub fn step_count(&self) -> usize {