Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Sep 27, 2023
1 parent a9f5190 commit 039a468
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ rustc_queries! {
/// correctly.
query has_structural_eq_impl(ty: Ty<'tcx>) -> bool {
desc {
"computing whether `{}` implements `PartialStructuralEq`",
"computing whether `{}` implements `StructuralPartialEq`",
ty
}
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_middle/src/ty/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ impl<'tcx> Ty<'tcx> {
/// Primitive types (`u32`, `str`) have structural equality by definition. For composite data
/// types, equality for the type as a whole is structural when it is the same as equality
/// between all components (fields, array elements, etc.) of that type. For ADTs, structural
/// equality is indicated by an implementation of `PartialStructuralEq` for that type.
/// equality is indicated by an implementation of `StructuralPartialEq` for that type.
///
/// This function is "shallow" because it may return `true` for a composite type whose fields
/// are not `StructuralPartialEq`. For example, `[T; 4]` has structural equality regardless of `T`
Expand All @@ -1160,7 +1160,7 @@ impl<'tcx> Ty<'tcx> {
#[inline]
pub fn is_structural_eq_shallow(self, tcx: TyCtxt<'tcx>) -> bool {
match self.kind() {
// Look for an impl of `PartialStructuralEq`.
// Look for an impl of `StructuralPartialEq`.
ty::Adt(..) => tcx.has_structural_eq_impl(self),

// Primitive types that satisfy `Eq`.
Expand Down

0 comments on commit 039a468

Please sign in to comment.