Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f8bfcdb

Browse files
committedFeb 29, 2024·
Remove IDE0060 suppressions
Issue resolved in `Microsoft.CodeAnalysis.CSharp.CodeStyle` 4.5.0-3.22613.20
1 parent 8bdbf99 commit f8bfcdb

File tree

9 files changed

+0
-14
lines changed

9 files changed

+0
-14
lines changed
 

‎src/libraries/System.Private.CoreLib/src/System/Buffer.cs

-2
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ internal static void BulkMoveWithWriteBarrier(ref byte destination, ref byte sou
185185
_BulkMoveWithWriteBarrier(ref destination, ref source, byteCount);
186186
}
187187

188-
#pragma warning disable IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
189188
// Non-inlinable wrapper around the loop for copying large blocks in chunks
190189
[MethodImpl(MethodImplOptions.NoInlining)]
191190
private static void _BulkMoveWithWriteBarrier(ref byte destination, ref byte source, nuint byteCount)
@@ -220,7 +219,6 @@ private static void _BulkMoveWithWriteBarrier(ref byte destination, ref byte sou
220219
}
221220
__BulkMoveWithWriteBarrier(ref destination, ref source, byteCount);
222221
}
223-
#pragma warning restore IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
224222

225223
#endif // !MONO
226224
}

‎src/libraries/System.Private.CoreLib/src/System/ReadOnlySpan.cs

-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ public ReadOnlySpan(ref readonly T reference)
120120
_length = 1;
121121
}
122122

123-
#pragma warning disable IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
124123
// Constructor for internal use only. It is not safe to expose publicly, and is instead exposed via the unsafe MemoryMarshal.CreateReadOnlySpan.
125124
[MethodImpl(MethodImplOptions.AggressiveInlining)]
126125
internal ReadOnlySpan(ref T reference, int length)
@@ -130,7 +129,6 @@ internal ReadOnlySpan(ref T reference, int length)
130129
_reference = ref reference;
131130
_length = length;
132131
}
133-
#pragma warning restore IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
134132

135133
/// <summary>
136134
/// Returns the specified element of the read-only span.

‎src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MemoryMarshal.cs

-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ public static Memory<T> AsMemory<T>(ReadOnlyMemory<T> memory) =>
8787
/// </summary>
8888
public static ref T GetReference<T>(ReadOnlySpan<T> span) => ref span._reference;
8989

90-
#pragma warning disable IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
9190
/// <summary>
9291
/// Returns a reference to the 0th element of the Span. If the Span is empty, returns a reference to fake non-null pointer. Such a reference can be used
9392
/// for pinning but must never be dereferenced. This is useful for interop with methods that do not accept null pointers for zero-sized buffers.
@@ -101,7 +100,6 @@ public static Memory<T> AsMemory<T>(ReadOnlyMemory<T> memory) =>
101100
/// </summary>
102101
[MethodImpl(MethodImplOptions.AggressiveInlining)]
103102
internal static unsafe ref T GetNonNullPinnableReference<T>(ReadOnlySpan<T> span) => ref (span.Length != 0) ? ref Unsafe.AsRef(in span._reference) : ref Unsafe.AsRef<T>((void*)1);
104-
#pragma warning restore IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
105103

106104
/// <summary>
107105
/// Casts a Span of one primitive type <typeparamref name="TFrom"/> to another primitive type <typeparamref name="TTo"/>.

‎src/libraries/System.Private.CoreLib/src/System/SearchValues/IndexOfAnyAsciiSearcher.cs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using System.Runtime.Intrinsics.X86;
1111

1212
#pragma warning disable 8500 // sizeof of managed types
13-
#pragma warning disable IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
1413

1514
namespace System.Buffers
1615
{

‎src/libraries/System.Private.CoreLib/src/System/SearchValues/ProbabilisticMap.cs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using System.Runtime.Intrinsics.Wasm;
1111
using System.Runtime.Intrinsics.X86;
1212

13-
#pragma warning disable IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
1413

1514
namespace System.Buffers
1615
{

‎src/libraries/System.Private.CoreLib/src/System/Span.cs

-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ public Span(ref T reference)
126126
_length = 1;
127127
}
128128

129-
#pragma warning disable IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
130129
// Constructor for internal use only. It is not safe to expose publicly, and is instead exposed via the unsafe MemoryMarshal.CreateSpan.
131130
[MethodImpl(MethodImplOptions.AggressiveInlining)]
132131
internal Span(ref T reference, int length)
@@ -136,7 +135,6 @@ internal Span(ref T reference, int length)
136135
_reference = ref reference;
137136
_length = length;
138137
}
139-
#pragma warning restore IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
140138

141139
/// <summary>
142140
/// Returns a reference to specified element of the Span.

‎src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Packed.cs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using System.Runtime.Intrinsics;
88
using System.Runtime.Intrinsics.X86;
99

10-
#pragma warning disable IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
1110

1211
#pragma warning disable 8500 // sizeof of managed types
1312

‎src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using System.Runtime.InteropServices;
99
using System.Runtime.Intrinsics;
1010

11-
#pragma warning disable IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
1211

1312
#pragma warning disable 8500 // sizeof of managed types
1413

‎src/libraries/System.Private.CoreLib/src/System/SpanHelpers.cs

-2
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ public static unsafe void Reverse<T>(ref T elements, nuint length)
329329
ReverseInner(ref elements, length);
330330
}
331331

332-
#pragma warning disable IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
333332
[MethodImpl(MethodImplOptions.AggressiveInlining)]
334333
private static void ReverseInner<T>(ref T elements, nuint length)
335334
{
@@ -346,6 +345,5 @@ private static void ReverseInner<T>(ref T elements, nuint length)
346345
last = ref Unsafe.Subtract(ref last, 1);
347346
} while (Unsafe.IsAddressLessThan(ref first, ref last));
348347
}
349-
#pragma warning restore IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
350348
}
351349
}

0 commit comments

Comments
 (0)
Please sign in to comment.