Skip to content
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
2 changes: 0 additions & 2 deletions src/libraries/System.Private.CoreLib/src/System/Buffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ internal static void BulkMoveWithWriteBarrier(ref byte destination, ref byte sou
_BulkMoveWithWriteBarrier(ref destination, ref source, byteCount);
}

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

#endif // !MONO
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ public ReadOnlySpan(ref readonly T reference)
_length = 1;
}

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

/// <summary>
/// Returns the specified element of the read-only span.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public static Memory<T> AsMemory<T>(ReadOnlyMemory<T> memory) =>
/// </summary>
public static ref T GetReference<T>(ReadOnlySpan<T> span) => ref span._reference;

#pragma warning disable IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228
/// <summary>
/// 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
/// for pinning but must never be dereferenced. This is useful for interop with methods that do not accept null pointers for zero-sized buffers.
Expand All @@ -101,7 +100,6 @@ public static Memory<T> AsMemory<T>(ReadOnlyMemory<T> memory) =>
/// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
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);
#pragma warning restore IDE0060 // https://github.com/dotnet/roslyn-analyzers/issues/6228

/// <summary>
/// Casts a Span of one primitive type <typeparamref name="TFrom"/> to another primitive type <typeparamref name="TTo"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using System.Runtime.Intrinsics.X86;

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

namespace System.Buffers
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using System.Runtime.Intrinsics.Wasm;
using System.Runtime.Intrinsics.X86;

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

namespace System.Buffers
{
Expand Down
2 changes: 0 additions & 2 deletions src/libraries/System.Private.CoreLib/src/System/Span.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ public Span(ref T reference)
_length = 1;
}

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

/// <summary>
/// Returns a reference to specified element of the Span.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;

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

#pragma warning disable 8500 // sizeof of managed types

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;

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

#pragma warning disable 8500 // sizeof of managed types

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ public static unsafe void Reverse<T>(ref T elements, nuint length)
ReverseInner(ref elements, length);
}

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