diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-09-22 12:15:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-22 12:15:28 +0200 |
| commit | 66f272d6ca9faf897a8cd668f2b0c9ce42ec507d (patch) | |
| tree | ae7fe58ed9761962e4a770134728998874e77935 | |
| parent | fc4cfe01f6b0f0117e285b1349be17ff393bbcd4 (diff) | |
| parent | 7fc081b4d96dc2f5cc4e291569a14e9b7f6461aa (diff) | |
| download | rust-66f272d6ca9faf897a8cd668f2b0c9ce42ec507d.tar.gz rust-66f272d6ca9faf897a8cd668f2b0c9ce42ec507d.zip | |
Rollup merge of #116041 - compiler-errors:rigid-note, r=RalfJung
Add note to `is_known_rigid` Adds a note requested by `@RalfJung` in https://github.com/rust-lang/rust/pull/114941#discussion_r1329963704 Let me know if there are any other fns that need documentation, I could throw them into this PR too :)
| -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 |
