diff options
| author | Michael Goulet <michael@errs.io> | 2023-09-21 19:05:09 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-09-22 01:02:38 +0000 |
| commit | 7fc081b4d96dc2f5cc4e291569a14e9b7f6461aa (patch) | |
| tree | de16c80bf12fa6e500917ddc34cb3e03d0634327 | |
| parent | 0fd7ce99b0508aff7f7a2c639871de4e8080e3f8 (diff) | |
| download | rust-7fc081b4d96dc2f5cc4e291569a14e9b7f6461aa.tar.gz rust-7fc081b4d96dc2f5cc4e291569a14e9b7f6461aa.zip | |
Add note to is_known_rigid
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ impl<'tcx> Ty<'tcx> { } } + /// 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 |
