Skip to content

Commit 1f61f36

Browse files
Add comment about the shallow subst rule
1 parent 485111c commit 1f61f36

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc_typeck/check/wfcheck.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,9 @@ fn check_associated_type_defaults(
482482
/// substitution forces the trait to add a `B: Clone` bound to be accepted,
483483
/// which means that an `impl` can replace any default without breaking
484484
/// others.
485+
///
486+
/// Note that this isn't needed for soundness: The defaults would still be
487+
/// checked in any impl that doesn't override them.
485488
struct DefaultNormalizer<'tcx> {
486489
tcx: TyCtxt<'tcx>,
487490
map: FxHashMap<ty::ProjectionTy<'tcx>, Ty<'tcx>>,

0 commit comments

Comments
 (0)