about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2023-06-06 09:37:30 +0200
committerlcnr <rust@lcnr.de>2023-06-06 09:37:30 +0200
commit01aaad3f1fd224d3761c2d3b78469c5ed9db7ff5 (patch)
treebd021e0f595ae8044f9ca50da63bcad1865074c1 /compiler/rustc_middle/src
parentfd9bf594366e73efb1a26a023e0b4de8eff82b94 (diff)
remove `has_error_field` helper method
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/ty/util.rs12
1 files changed, 0 insertions, 12 deletions
diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs
index dce2f5545f5..d45e4d595a7 100644
--- a/compiler/rustc_middle/src/ty/util.rs
+++ b/compiler/rustc_middle/src/ty/util.rs
@@ -173,18 +173,6 @@ impl<'tcx> TyCtxt<'tcx> {
         }
     }
 
-    pub fn has_error_field(self, ty: Ty<'tcx>) -> bool {
-        if let ty::Adt(def, substs) = *ty.kind() {
-            for field in def.all_fields() {
-                let field_ty = field.ty(self, substs);
-                if let ty::Error(_) = field_ty.kind() {
-                    return true;
-                }
-            }
-        }
-        false
-    }
-
     /// Attempts to returns the deeply last field of nested structures, but
     /// does not apply any normalization in its search. Returns the same type
     /// if input `ty` is not a structure at all.