@@ -3526,9 +3526,9 @@ void swift::diagnoseTypeAvailability(const TypeRepr *TR, Type T, SourceLoc loc,
35263526}
35273527
35283528static void diagnoseMissingConformance (
3529- SourceLoc loc, Type type, ProtocolDecl *proto, ModuleDecl * module ) {
3529+ SourceLoc loc, Type type, ProtocolDecl *proto, const DeclContext *fromDC ) {
35303530 assert (proto->isSpecificProtocol (KnownProtocolKind::Sendable));
3531- diagnoseMissingSendableConformance (loc, type, module );
3531+ diagnoseMissingSendableConformance (loc, type, fromDC );
35323532}
35333533
35343534bool
@@ -3546,16 +3546,14 @@ swift::diagnoseConformanceAvailability(SourceLoc loc,
35463546
35473547 // Diagnose "missing" conformances where we needed a conformance but
35483548 // didn't have one.
3549+ auto *DC = where.getDeclContext ();
35493550 if (auto builtinConformance = dyn_cast<BuiltinProtocolConformance>(rootConf)){
35503551 if (builtinConformance->isMissing ()) {
35513552 diagnoseMissingConformance (loc, builtinConformance->getType (),
3552- builtinConformance->getProtocol (),
3553- where.getDeclContext ()->getParentModule ());
3553+ builtinConformance->getProtocol (), DC);
35543554 }
35553555 }
35563556
3557- auto *DC = where.getDeclContext ();
3558-
35593557 auto maybeEmitAssociatedTypeNote = [&]() {
35603558 if (!depTy && !replacementTy)
35613559 return ;
0 commit comments