Skip to content

Commit

Permalink
Rollup merge of rust-lang#116041 - compiler-errors:rigid-note, r=Ralf…
Browse files Browse the repository at this point in the history
…Jung

Add note to `is_known_rigid`

Adds a note requested by `@RalfJung` in rust-lang#114941 (comment)

Let me know if there are any other fns that need documentation, I could throw them into this PR too :)
  • Loading branch information
matthiaskrgr authored Sep 22, 2023
2 parents fc4cfe0 + 7fc081b commit 66f272d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/rustc_middle/src/ty/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 66f272d

Please sign in to comment.