diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index e3e014a3b2a81..f89136073d16e 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -2946,6 +2946,11 @@ impl<'tcx> Ty<'tcx> { } } + /// Whether the outermost type cannot be further normalized, resolved, or + /// substituted. This includes all primitive types, but also things like + /// ADTs and trait objects, sice even if their arguments or nested types + /// may be further simplified, the outermost [`TyKind`] or type constructor + /// remains the same. pub fn is_known_rigid(self) -> bool { match self.kind() { Bool