Skip to content

System.Runtime no longer needs to enable preview features #67162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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