@@ -1724,32 +1724,6 @@ static void diagnoseGenericArgumentsOnSelf(const TypeResolution &resolution,
17241724 }
17251725}
17261726
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-
17531727// / Resolve the given identifier type representation as an unqualified type,
17541728// / returning the type it references.
17551729// / \param silContext Used to look up generic parameters in SIL mode.
@@ -1886,8 +1860,6 @@ resolveUnqualifiedIdentTypeRepr(const TypeResolution &resolution,
18861860 return ErrorType::get (ctx);
18871861 }
18881862
1889- diagnoseSpanType (currentDecl, repr->getLoc (), DC);
1890-
18911863 repr->setValue (currentDecl, currentDC);
18921864 return current;
18931865 }
@@ -2108,8 +2080,6 @@ static Type resolveQualifiedIdentTypeRepr(const TypeResolution &resolution,
21082080 member = memberTypes.back ().Member ;
21092081 inferredAssocType = memberTypes.back ().InferredAssociatedType ;
21102082 repr->setValue (member, nullptr );
2111-
2112- diagnoseSpanType (member, repr->getLoc (), DC);
21132083 }
21142084
21152085 return maybeDiagnoseBadMemberType (member, memberType, inferredAssocType);
0 commit comments