Skip to content

Commit

Permalink
System.Runtime no longer needs to enable preview features (#67162)
Browse files Browse the repository at this point in the history
* System.Runtime no longer needs to enable preview features

* Remove diagnostic suppression around VirtualStaticsInInterfaces

* Remove remaining CA2252 suppressions for VirtualStaticsInInterfaces
  • Loading branch information
jeffhandley committed Apr 6, 2022
1 parent 6e3eb0d commit afb1c64
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@

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

internal readonly struct AsyncReadWriteAdapter : IReadWriteAdapter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ public static bool IsSupported(string feature)
case ByRefFields:
case UnmanagedSignatureCallingConvention:
case DefaultImplementationsOfInterfaces:
#pragma warning disable CA2252
case VirtualStaticsInInterfaces:
#pragma warning restore CA2252
return true;
case nameof(IsDynamicCodeSupported):
return IsDynamicCodeSupported;
Expand Down
3 changes: 0 additions & 3 deletions src/libraries/System.Runtime/src/System.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
<!-- The following 2 lines disable the automatic generation of the [RequiresPreviewFeatures] assembly level attribute and set LangVersion to Preview on the latest TFM-->
<EnablePreviewFeatures>True</EnablePreviewFeatures>
<GenerateRequiresPreviewFeaturesAttribute>False</GenerateRequiresPreviewFeaturesAttribute>
</PropertyGroup>
<ItemGroup>
<!-- 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. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1138,14 +1138,12 @@ public CurrentState(NfaMatchingState nfaState)
/// <summary>Represents a set of routines for operating over a <see cref="CurrentState"/>.</summary>
private interface IStateHandler
{
#pragma warning disable CA2252 // This API requires opting into preview features
public static abstract bool StartsWithLineAnchor(ref CurrentState state);
public static abstract bool IsNullable(ref CurrentState state, uint nextCharKind);
public static abstract bool IsDeadend(ref CurrentState state);
public static abstract int FixedLength(ref CurrentState state);
public static abstract bool IsInitialState(ref CurrentState state);
public static abstract bool TakeTransition(SymbolicRegexBuilder<TSetType> builder, ref CurrentState state, int mintermId);
#pragma warning restore CA2252 // This API requires opting into preview features
}

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

0 comments on commit afb1c64

Please sign in to comment.