We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4f46643 + 99aad72 commit c6bde8dCopy full SHA for c6bde8d
compiler/rustc_middle/src/ty/sty.rs
@@ -970,6 +970,10 @@ impl<'tcx> rustc_type_ir::inherent::Ty<TyCtxt<'tcx>> for Ty<'tcx> {
970
971
/// Type utilities
972
impl<'tcx> Ty<'tcx> {
973
+ // It would be nicer if this returned the value instead of a reference,
974
+ // like how `Predicate::kind` and `Region::kind` do. (It would result in
975
+ // many fewer subsequent dereferences.) But that gives a small but
976
+ // noticeable performance hit. See #126069 for details.
977
#[inline(always)]
978
pub fn kind(self) -> &'tcx TyKind<'tcx> {
979
self.0.0
0 commit comments