@@ -1724,32 +1724,6 @@ static void diagnoseGenericArgumentsOnSelf(const TypeResolution &resolution,
1724
1724
}
1725
1725
}
1726
1726
1727
- // / Diagnose when this is one of the Span types, which currently requires
1728
- // / an experimental feature to use.
1729
- static void diagnoseSpanType (TypeDecl *typeDecl, SourceLoc loc,
1730
- const DeclContext *dc) {
1731
- if (loc.isInvalid ())
1732
- return ;
1733
-
1734
- if (!typeDecl->isStdlibDecl ())
1735
- return ;
1736
-
1737
- ASTContext &ctx = typeDecl->getASTContext ();
1738
- if (ctx.LangOpts .hasFeature (Feature::Span))
1739
- return ;
1740
-
1741
- auto nameString = typeDecl->getName ().str ();
1742
- if (nameString != " Span" && nameString != " RawSpan" )
1743
- return ;
1744
-
1745
- // Don't require this in the standard library or _Concurrency library.
1746
- auto module = dc->getParentModule ();
1747
- if (module->isStdlibModule () || module->getName ().str () == " _Concurrency" )
1748
- return ;
1749
-
1750
- ctx.Diags .diagnose (loc, diag::span_requires_feature_flag, nameString);
1751
- }
1752
-
1753
1727
// / Resolve the given identifier type representation as an unqualified type,
1754
1728
// / returning the type it references.
1755
1729
// / \param silContext Used to look up generic parameters in SIL mode.
@@ -1886,8 +1860,6 @@ resolveUnqualifiedIdentTypeRepr(const TypeResolution &resolution,
1886
1860
return ErrorType::get (ctx);
1887
1861
}
1888
1862
1889
- diagnoseSpanType (currentDecl, repr->getLoc (), DC);
1890
-
1891
1863
repr->setValue (currentDecl, currentDC);
1892
1864
return current;
1893
1865
}
@@ -2108,8 +2080,6 @@ static Type resolveQualifiedIdentTypeRepr(const TypeResolution &resolution,
2108
2080
member = memberTypes.back ().Member ;
2109
2081
inferredAssocType = memberTypes.back ().InferredAssociatedType ;
2110
2082
repr->setValue (member, nullptr );
2111
-
2112
- diagnoseSpanType (member, repr->getLoc (), DC);
2113
2083
}
2114
2084
2115
2085
return maybeDiagnoseBadMemberType (member, memberType, inferredAssocType);
0 commit comments