Skip to content

Commit ffcd2fb

Browse files
committed
Restore NonVersionableAttribute for SystemCollectionsImmutable
1 parent 9230190 commit ffcd2fb

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

tracer/build/_build/UpdateVendors/VendoredDependency.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ private static string FixSystemCollectionsImmutable(string filePath, string cont
393393
contents = contents.Insert(namespaceIndex, usings);
394394

395395
contents = contents
396-
.Replace("[NonVersionable]", "/* [NonVersionable] */")
397396
.Replace("[ValidatedNotNull]", string.Empty)
398397
.Replace("#nullable restore", "#nullable enable");
399398

tracer/src/Datadog.Trace/Vendors/System.Collections.Immutable/System/Collections/Immutable/ImmutableArray_1.Minimal.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace Datadog.Trace.VendoredMicrosoftCode.System.Collections.Immutable
4747
/// it is insulated from other threads.
4848
/// </devremarks>
4949
[DebuggerDisplay("{DebuggerDisplay,nq}")]
50-
/* [NonVersionable] */ // Applies to field layout
50+
[NonVersionable] // Applies to field layout
5151
internal partial struct ImmutableArray<T> : IEnumerable<T>, IEquatable<ImmutableArray<T>>, IImmutableArray
5252
{
5353
/// <summary>
@@ -86,7 +86,7 @@ internal ImmutableArray(T[]? items)
8686
/// <param name="left">The instance to the left of the operator.</param>
8787
/// <param name="right">The instance to the right of the operator.</param>
8888
/// <returns><c>true</c> if the values' underlying arrays are reference equal; <c>false</c> otherwise.</returns>
89-
/* [NonVersionable] */
89+
[NonVersionable]
9090
public static bool operator ==(ImmutableArray<T> left, ImmutableArray<T> right)
9191
{
9292
return left.Equals(right);
@@ -98,7 +98,7 @@ internal ImmutableArray(T[]? items)
9898
/// <param name="left">The instance to the left of the operator.</param>
9999
/// <param name="right">The instance to the right of the operator.</param>
100100
/// <returns><c>true</c> if the values' underlying arrays are reference not equal; <c>false</c> otherwise.</returns>
101-
/* [NonVersionable] */
101+
[NonVersionable]
102102
public static bool operator !=(ImmutableArray<T> left, ImmutableArray<T> right)
103103
{
104104
return !left.Equals(right);
@@ -135,7 +135,7 @@ internal ImmutableArray(T[]? items)
135135
/// <returns>The element at the specified index in the read-only list.</returns>
136136
public T this[int index]
137137
{
138-
/* [NonVersionable] */
138+
[NonVersionable]
139139
get
140140
{
141141
// We intentionally do not check this.array != null, and throw NullReferenceException
@@ -168,7 +168,7 @@ public ref readonly T ItemRef(int index)
168168
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
169169
public bool IsEmpty
170170
{
171-
/* [NonVersionable] */
171+
[NonVersionable]
172172
get { return this.array!.Length == 0; }
173173
}
174174

@@ -178,7 +178,7 @@ public bool IsEmpty
178178
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
179179
public int Length
180180
{
181-
/* [NonVersionable] */
181+
[NonVersionable]
182182
get
183183
{
184184
// We intentionally do not check this.array != null, and throw NullReferenceException
@@ -331,7 +331,7 @@ public override bool Equals([NotNullWhen(true)] object? obj)
331331
/// <returns>
332332
/// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.
333333
/// </returns>
334-
/* [NonVersionable] */
334+
[NonVersionable]
335335
public bool Equals(ImmutableArray<T> other)
336336
{
337337
return this.array == other.array;

0 commit comments

Comments
 (0)