Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 8266cbc

Browse files
authored
Fix Obsolete on ReadOnlySpan Equals and GetHashCode methods (#15820)
* Fix Obsolete on ReadOnlySpan Equals and GetHashCode methods * Delete unnecessary CLSCompliant attribute
1 parent 20010ab commit 8266cbc

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/mscorlib/shared/System/ReadOnlySpan.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public bool TryCopyTo(Span<T> destination)
240240
/// Always thrown by this method.
241241
/// </exception>
242242
/// </summary>
243-
[Obsolete("Equals() on Span will always throw an exception. Use == instead.")]
243+
[Obsolete("Equals() on ReadOnlySpan will always throw an exception. Use == instead.")]
244244
[EditorBrowsable(EditorBrowsableState.Never)]
245245
public override bool Equals(object obj)
246246
{
@@ -253,7 +253,7 @@ public override bool Equals(object obj)
253253
/// Always thrown by this method.
254254
/// </exception>
255255
/// </summary>
256-
[Obsolete("GetHashCode() on Span will always throw an exception.")]
256+
[Obsolete("GetHashCode() on ReadOnlySpan will always throw an exception.")]
257257
[EditorBrowsable(EditorBrowsableState.Never)]
258258
public override int GetHashCode()
259259
{

src/mscorlib/src/System/RuntimeHandles.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ internal RuntimeType GetRuntimeType()
244244
[MethodImplAttribute(MethodImplOptions.InternalCall)]
245245
internal extern static RuntimeModule GetModule(RuntimeType type);
246246

247-
[CLSCompliant(false)]
248247
public ModuleHandle GetModuleHandle()
249248
{
250249
return new ModuleHandle(RuntimeTypeHandle.GetModule(m_type));

0 commit comments

Comments
 (0)