Skip to content

Commit afb1c64

Browse files
authored
System.Runtime no longer needs to enable preview features (#67162)
* System.Runtime no longer needs to enable preview features * Remove diagnostic suppression around VirtualStaticsInInterfaces * Remove remaining CA2252 suppressions for VirtualStaticsInInterfaces
1 parent 6e3eb0d commit afb1c64

File tree

4 files changed

+0
-9
lines changed

4 files changed

+0
-9
lines changed

src/libraries/System.Net.Security/src/System/Net/Security/ReadWriteAdapter.cs

-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77

88
namespace System.Net.Security
99
{
10-
#pragma warning disable CA2252 // This API requires opting into preview features
1110
internal interface IReadWriteAdapter
1211
{
1312
static abstract ValueTask<int> ReadAsync(Stream stream, Memory<byte> buffer, CancellationToken cancellationToken);
1413
static abstract ValueTask WriteAsync(Stream stream, byte[] buffer, int offset, int count, CancellationToken cancellationToken);
1514
static abstract Task FlushAsync(Stream stream, CancellationToken cancellationToken);
1615
static abstract Task WaitAsync(TaskCompletionSource<bool> waiter);
1716
}
18-
#pragma warning restore CA2252
1917

2018
internal readonly struct AsyncReadWriteAdapter : IReadWriteAdapter
2119
{

src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.cs

-2
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ public static bool IsSupported(string feature)
4949
case ByRefFields:
5050
case UnmanagedSignatureCallingConvention:
5151
case DefaultImplementationsOfInterfaces:
52-
#pragma warning disable CA2252
5352
case VirtualStaticsInInterfaces:
54-
#pragma warning restore CA2252
5553
return true;
5654
case nameof(IsDynamicCodeSupported):
5755
return IsDynamicCodeSupported;

src/libraries/System.Runtime/src/System.Runtime.csproj

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
44
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
55
<Nullable>enable</Nullable>
6-
<!-- The following 2 lines disable the automatic generation of the [RequiresPreviewFeatures] assembly level attribute and set LangVersion to Preview on the latest TFM-->
7-
<EnablePreviewFeatures>True</EnablePreviewFeatures>
8-
<GenerateRequiresPreviewFeaturesAttribute>False</GenerateRequiresPreviewFeaturesAttribute>
96
</PropertyGroup>
107
<ItemGroup>
118
<!-- Compiler throws error if you try to use System.Void and instructs you to use void keyword instead. So we have manually added a typeforward for this type. -->

src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/SymbolicRegexMatcher.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1138,14 +1138,12 @@ public CurrentState(NfaMatchingState nfaState)
11381138
/// <summary>Represents a set of routines for operating over a <see cref="CurrentState"/>.</summary>
11391139
private interface IStateHandler
11401140
{
1141-
#pragma warning disable CA2252 // This API requires opting into preview features
11421141
public static abstract bool StartsWithLineAnchor(ref CurrentState state);
11431142
public static abstract bool IsNullable(ref CurrentState state, uint nextCharKind);
11441143
public static abstract bool IsDeadend(ref CurrentState state);
11451144
public static abstract int FixedLength(ref CurrentState state);
11461145
public static abstract bool IsInitialState(ref CurrentState state);
11471146
public static abstract bool TakeTransition(SymbolicRegexBuilder<TSetType> builder, ref CurrentState state, int mintermId);
1148-
#pragma warning restore CA2252 // This API requires opting into preview features
11491147
}
11501148

11511149
/// <summary>An <see cref="IStateHandler"/> for operating over <see cref="CurrentState"/> instances configured as DFA states.</summary>

0 commit comments

Comments
 (0)