@@ -1187,8 +1187,7 @@ class Classification {
11871187 Classification result;
11881188 bool considerAsync = !onlyEffect || *onlyEffect == EffectKind::Async;
11891189 bool considerThrows = !onlyEffect || *onlyEffect == EffectKind::Throws;
1190- bool considerUnsafe = (!onlyEffect || *onlyEffect == EffectKind::Unsafe) &&
1191- ctx.LangOpts .hasFeature (Feature::StrictMemorySafety);
1190+ bool considerUnsafe = (!onlyEffect || *onlyEffect == EffectKind::Unsafe);
11921191
11931192 // If we're tracking "unsafe" effects, compute them here.
11941193 if (considerUnsafe) {
@@ -1708,8 +1707,7 @@ class ApplyClassifier {
17081707 !fnType->isAsync () &&
17091708 !E->isImplicitlyAsync () &&
17101709 !hasAnyConformances &&
1711- (fnRef.getExplicitSafety () == ExplicitSafety::Safe ||
1712- !ctx.LangOpts .hasFeature (Feature::StrictMemorySafety))) {
1710+ fnRef.getExplicitSafety () == ExplicitSafety::Safe) {
17131711 return Classification ();
17141712 }
17151713
@@ -1928,7 +1926,6 @@ class ApplyClassifier {
19281926 // If the safety of the callee is unspecified, check the safety of the
19291927 // arguments specifically.
19301928 if (hasUnspecifiedSafety &&
1931- ctx.LangOpts .hasFeature (Feature::StrictMemorySafety) &&
19321929 !(assumedSafeArguments && assumedSafeArguments->contains (E))) {
19331930 classifyApplyEffect (EffectKind::Unsafe);
19341931 }
@@ -4554,8 +4551,7 @@ class CheckEffectsCoverage : public EffectsHandlingWalker<CheckEffectsCoverage>
45544551 Ctx.Diags .diagnose (S->getForLoc (), diag::for_unsafe_without_unsafe)
45554552 .fixItInsert (insertionLoc, " unsafe " );
45564553 }
4557- } else if (S->getUnsafeLoc ().isValid () &&
4558- Ctx.LangOpts .hasFeature (Feature::StrictMemorySafety)) {
4554+ } else if (S->getUnsafeLoc ().isValid ()) {
45594555 // Extraneous "unsafe" on the sequence.
45604556 Ctx.Diags .diagnose (S->getUnsafeLoc (), diag::no_unsafe_in_unsafe_for)
45614557 .fixItRemove (S->getUnsafeLoc ());
@@ -4600,9 +4596,6 @@ class CheckEffectsCoverage : public EffectsHandlingWalker<CheckEffectsCoverage>
46004596 }
46014597
46024598 void diagnoseRedundantUnsafe (UnsafeExpr *E) const {
4603- if (!Ctx.LangOpts .hasFeature (Feature::StrictMemorySafety))
4604- return ;
4605-
46064599 // Silence this warning in the expansion of the _SwiftifyImport macro.
46074600 // This is a hack because it's tricky to determine when to insert "unsafe".
46084601 unsigned bufferID =
0 commit comments