@@ -1730,32 +1730,6 @@ static void diagnoseGenericArgumentsOnSelf(const TypeResolution &resolution,
17301730 }
17311731}
17321732
1733- // / Diagnose when this is one of the Span types, which currently requires
1734- // / an experimental feature to use.
1735- static void diagnoseSpanType (TypeDecl *typeDecl, SourceLoc loc,
1736- const DeclContext *dc) {
1737- if (loc.isInvalid ())
1738- return ;
1739-
1740- if (!typeDecl->isStdlibDecl ())
1741- return ;
1742-
1743- ASTContext &ctx = typeDecl->getASTContext ();
1744- if (ctx.LangOpts .hasFeature (Feature::Span))
1745- return ;
1746-
1747- auto nameString = typeDecl->getName ().str ();
1748- if (nameString != " Span" && nameString != " RawSpan" )
1749- return ;
1750-
1751- // Don't require this in the standard library or _Concurrency library.
1752- auto module = dc->getParentModule ();
1753- if (module ->isStdlibModule () || module ->getName ().str () == " _Concurrency" )
1754- return ;
1755-
1756- ctx.Diags .diagnose (loc, diag::span_requires_feature_flag, nameString);
1757- }
1758-
17591733// / Resolve the given identifier type representation as an unqualified type,
17601734// / returning the type it references.
17611735// / \param silContext Used to look up generic parameters in SIL mode.
@@ -1892,8 +1866,6 @@ resolveUnqualifiedIdentTypeRepr(const TypeResolution &resolution,
18921866 return ErrorType::get (ctx);
18931867 }
18941868
1895- diagnoseSpanType (currentDecl, repr->getLoc (), DC);
1896-
18971869 repr->setValue (currentDecl, currentDC);
18981870 return current;
18991871 }
@@ -2114,8 +2086,6 @@ static Type resolveQualifiedIdentTypeRepr(const TypeResolution &resolution,
21142086 member = memberTypes.back ().Member ;
21152087 inferredAssocType = memberTypes.back ().InferredAssociatedType ;
21162088 repr->setValue (member, nullptr );
2117-
2118- diagnoseSpanType (member, repr->getLoc (), DC);
21192089 }
21202090
21212091 return maybeDiagnoseBadMemberType (member, memberType, inferredAssocType);
0 commit comments