Skip to content

Commit

Permalink
Unrolled build for rust-lang#116041
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#116041 - compiler-errors:rigid-note, r=RalfJung

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
rust-timer authored Sep 22, 2023
2 parents 5a4e47e + 7fc081b commit c272241
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 c272241

Please sign in to comment.