diff --git a/src/System.Memory/ref/System.Memory.cs b/src/System.Memory/ref/System.Memory.cs index a21d6c9da84f..802a0610d25d 100644 --- a/src/System.Memory/ref/System.Memory.cs +++ b/src/System.Memory/ref/System.Memory.cs @@ -7,7 +7,7 @@ namespace System { - public struct ReadOnlySpan + public readonly ref struct ReadOnlySpan { public static ReadOnlySpan Empty { get { throw null; } } public ReadOnlySpan(T[] array) { throw null;} @@ -39,7 +39,7 @@ public void CopyTo(Span destination) { } public bool TryCopyTo(Span destination) { throw null; } } - public struct Span + public readonly ref struct Span { public static Span Empty { get { throw null; } } public Span(T[] array) { throw null;} diff --git a/src/System.Memory/ref/System.Memory.csproj b/src/System.Memory/ref/System.Memory.csproj index 0d0db9a2fd95..6226292ea1aa 100644 --- a/src/System.Memory/ref/System.Memory.csproj +++ b/src/System.Memory/ref/System.Memory.csproj @@ -6,6 +6,7 @@ false {E883935B-D8FD-4FC9-A189-9D9E7F7EF550} true + 7.2 diff --git a/src/System.Memory/src/System.Memory.csproj b/src/System.Memory/src/System.Memory.csproj index 1091463c00c4..04eaf96d323e 100644 --- a/src/System.Memory/src/System.Memory.csproj +++ b/src/System.Memory/src/System.Memory.csproj @@ -9,6 +9,7 @@ true $(DefineConstants);netcoreapp $(DefineConstants);netstandard11 + 7.2 diff --git a/src/System.Memory/src/System/ReadOnlySpan.cs b/src/System.Memory/src/System/ReadOnlySpan.cs index 896ad403c112..b5b0f1c567f2 100644 --- a/src/System.Memory/src/System/ReadOnlySpan.cs +++ b/src/System.Memory/src/System/ReadOnlySpan.cs @@ -15,7 +15,7 @@ namespace System /// ReadOnlySpan represents a contiguous region of arbitrary memory. Unlike arrays, it can point to either managed /// or native memory, or to memory allocated on the stack. It is type- and memory-safe. /// - public struct ReadOnlySpan + public readonly ref struct ReadOnlySpan { /// /// Creates a new read-only span over the entirety of the target array. diff --git a/src/System.Memory/src/System/Span.cs b/src/System.Memory/src/System/Span.cs index 8dee68df2da8..af2143cb2e94 100644 --- a/src/System.Memory/src/System/Span.cs +++ b/src/System.Memory/src/System/Span.cs @@ -17,7 +17,7 @@ namespace System /// [DebuggerTypeProxy(typeof(SpanDebugView<>))] [DebuggerDisplay("Length = {Length}")] - public struct Span + public readonly ref struct Span { /// /// Creates a new span over the entirety of the target array. diff --git a/src/System.Runtime/ref/System.Runtime.cs b/src/System.Runtime/ref/System.Runtime.cs index 3947729a4fe7..d122a4f2185f 100644 --- a/src/System.Runtime/ref/System.Runtime.cs +++ b/src/System.Runtime/ref/System.Runtime.cs @@ -1881,7 +1881,7 @@ public struct ReadOnlyMemory public bool DangerousTryGetArray(out ArraySegment arraySegment) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct ReadOnlySpan + public readonly ref struct ReadOnlySpan { public static ReadOnlySpan Empty { get { throw null; } } public ReadOnlySpan(T[] array) { throw null; } @@ -2068,7 +2068,7 @@ public partial struct Single : System.IComparable, System.IComparable, Sy public static bool TryParse(ReadOnlySpan s, out float result, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider provider = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public partial struct Span + public readonly ref struct Span { public static Span Empty { get { throw null; } } public Span(T[] array) { throw null; } diff --git a/src/System.Runtime/ref/System.Runtime.csproj b/src/System.Runtime/ref/System.Runtime.csproj index 349f7efa2045..7b13bb87fedf 100644 --- a/src/System.Runtime/ref/System.Runtime.csproj +++ b/src/System.Runtime/ref/System.Runtime.csproj @@ -5,6 +5,7 @@ true true {ADBCF120-3454-4A3C-9D1D-AC4293E795D6} + 7.2