From 7fc081b4d96dc2f5cc4e291569a14e9b7f6461aa Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Thu, 21 Sep 2023 19:05:09 +0000 Subject: [PATCH] Add note to is_known_rigid --- compiler/rustc_middle/src/ty/sty.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index e3e014a3b2a..c37cf384303 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -2946,6 +2946,11 @@ pub fn is_c_void(self, tcx: TyCtxt<'_>) -> bool { } } + /// Returns `true` when 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