From: Jonas Schievink Date: Thu, 29 Aug 2019 12:11:55 +0000 (+0200) Subject: Add comment about the shallow subst rule X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=1f61f36849249b5333c74f63d54d2f8bfe30ad59;p=rust.git Add comment about the shallow subst rule --- 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>>,