]> git.lizzy.rs Git - rust.git/commitdiff
rename create_raw_ty -> handle_raw_ty
authorAli MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
Wed, 23 Nov 2022 08:30:58 +0000 (11:30 +0300)
committerAli MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
Sat, 7 Jan 2023 10:42:15 +0000 (13:42 +0300)
compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs
compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

index f5cffef54e0ee9c875d5e08bfa77d40023d3ae95..970e84bf054e3f0d54fa4b928696ec8cf2b97a04 100644 (file)
@@ -369,14 +369,14 @@ pub fn register_bound(
         }
     }
 
-    pub fn create_raw_ty(&self, span: Span, ty: Ty<'tcx>) -> RawTy<'tcx> {
+    pub fn handle_raw_ty(&self, span: Span, ty: Ty<'tcx>) -> RawTy<'tcx> {
         RawTy { raw: ty, normalized: self.normalize(span, ty) }
     }
 
     pub fn to_ty(&self, ast_t: &hir::Ty<'_>) -> RawTy<'tcx> {
         let t = <dyn AstConv<'_>>::ast_ty_to_ty(self, ast_t);
         self.register_wf_obligation(t.into(), ast_t.span, traits::WellFormed(None));
-        self.create_raw_ty(ast_t.span, t)
+        self.handle_raw_ty(ast_t.span, t)
     }
 
     pub fn to_ty_saving_user_provided_ty(&self, ast_ty: &hir::Ty<'_>) -> Ty<'tcx> {
@@ -767,7 +767,7 @@ pub fn resolve_ty_and_res_fully_qualified_call(
                 // We manually call `register_wf_obligation` in the success path
                 // below.
                 let ty = <dyn AstConv<'_>>::ast_ty_to_ty_in_path(self, qself);
-                (self.create_raw_ty(span, ty), qself, segment)
+                (self.handle_raw_ty(span, ty), qself, segment)
             }
             QPath::LangItem(..) => {
                 bug!("`resolve_ty_and_res_fully_qualified_call` called on `LangItem`")
index 92a0b9785d042fabd264690501a0f1020b62a3bd..229220888957bc143b9ad456aba511ec0b94dd93 100644 (file)
@@ -1683,7 +1683,7 @@ fn finish_resolving_struct_path(
             QPath::Resolved(ref maybe_qself, ref path) => {
                 let self_ty = maybe_qself.as_ref().map(|qself| self.to_ty(qself).raw);
                 let ty = <dyn AstConv<'_>>::res_to_ty(self, self_ty, path, true);
-                (path.res, self.create_raw_ty(path_span, ty))
+                (path.res, self.handle_raw_ty(path_span, ty))
             }
             QPath::TypeRelative(ref qself, ref segment) => {
                 let ty = self.to_ty(qself);
@@ -1692,7 +1692,7 @@ fn finish_resolving_struct_path(
                     self, hir_id, path_span, ty.raw, qself, segment, true,
                 );
                 let ty = result.map(|(ty, _, _)| ty).unwrap_or_else(|_| self.tcx().ty_error());
-                let ty = self.create_raw_ty(path_span, ty);
+                let ty = self.handle_raw_ty(path_span, ty);
                 let result = result.map(|(_, kind, def_id)| (kind, def_id));
 
                 // Write back the new resolution.
@@ -1702,7 +1702,7 @@ fn finish_resolving_struct_path(
             }
             QPath::LangItem(lang_item, span, id) => {
                 let (res, ty) = self.resolve_lang_item_path(lang_item, span, hir_id, id);
-                (res, self.create_raw_ty(path_span, ty))
+                (res, self.handle_raw_ty(path_span, ty))
             }
         }
     }