@@ -1730,32 +1730,6 @@ static void diagnoseGenericArgumentsOnSelf(const TypeResolution &resolution,
1730
1730
}
1731
1731
}
1732
1732
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
-
1759
1733
// / Resolve the given identifier type representation as an unqualified type,
1760
1734
// / returning the type it references.
1761
1735
// / \param silContext Used to look up generic parameters in SIL mode.
@@ -1892,8 +1866,6 @@ resolveUnqualifiedIdentTypeRepr(const TypeResolution &resolution,
1892
1866
return ErrorType::get (ctx);
1893
1867
}
1894
1868
1895
- diagnoseSpanType (currentDecl, repr->getLoc (), DC);
1896
-
1897
1869
repr->setValue (currentDecl, currentDC);
1898
1870
return current;
1899
1871
}
@@ -2114,8 +2086,6 @@ static Type resolveQualifiedIdentTypeRepr(const TypeResolution &resolution,
2114
2086
member = memberTypes.back ().Member ;
2115
2087
inferredAssocType = memberTypes.back ().InferredAssociatedType ;
2116
2088
repr->setValue (member, nullptr );
2117
-
2118
- diagnoseSpanType (member, repr->getLoc (), DC);
2119
2089
}
2120
2090
2121
2091
return maybeDiagnoseBadMemberType (member, memberType, inferredAssocType);
0 commit comments