From 1f61f36849249b5333c74f63d54d2f8bfe30ad59 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Thu, 29 Aug 2019 14:11:55 +0200 Subject: [PATCH] Add comment about the shallow subst rule --- src/librustc_typeck/check/wfcheck.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/librustc_typeck/check/wfcheck.rs b/src/librustc_typeck/check/wfcheck.rs index 9f1ae37da1a..e39beb547d1 100644 --- a/src/librustc_typeck/check/wfcheck.rs +++ b/src/librustc_typeck/check/wfcheck.rs @@ -482,6 +482,9 @@ fn check_associated_type_defaults( /// substitution forces the trait to add a `B: Clone` bound to be accepted, /// which means that an `impl` can replace any default without breaking /// others. + /// + /// Note that this isn't needed for soundness: The defaults would still be + /// checked in any impl that doesn't override them. struct DefaultNormalizer<'tcx> { tcx: TyCtxt<'tcx>, map: FxHashMap, Ty<'tcx>>, -- 2.44.0