]> git.lizzy.rs Git - rust.git/commitdiff
Add comment about the shallow subst rule
authorJonas Schievink <jonasschievink@gmail.com>
Thu, 29 Aug 2019 12:11:55 +0000 (14:11 +0200)
committerJonas Schievink <jonasschievink@gmail.com>
Fri, 21 Feb 2020 18:41:22 +0000 (19:41 +0100)
src/librustc_typeck/check/wfcheck.rs

index 9f1ae37da1ad3ba6c02eb038162d0a183a73e512..e39beb547d1a78405928937014a84f8253aab2b3 100644 (file)
@@ -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::ProjectionTy<'tcx>, Ty<'tcx>>,