summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2017-09-09 19:44:19 -0400
committerGitHub <noreply@github.com>2017-09-09 19:44:19 -0400
commit3e32eb999e874969828cb241f72e3c0a0385e987 (patch)
treeb9d85ef50dd2c6d4765167873ad197639fb8fb2c /src
parentd6900913634dc59099149fbe6106c6a304da63eb (diff)
parente720daaea3bf24109dbf469f4e1d9fc8bb78787b (diff)
downloadcoreclr-3e32eb999e874969828cb241f72e3c0a0385e987.tar.gz
coreclr-3e32eb999e874969828cb241f72e3c0a0385e987.tar.bz2
coreclr-3e32eb999e874969828cb241f72e3c0a0385e987.zip
Merge pull request #13886 from ahsonkhan/SpanReadOnlyStruct
Marking {ReadOnly}Span with IsReadOnly attribute
Diffstat (limited to 'src')
-rw-r--r--src/mscorlib/shared/System/ReadOnlySpan.cs1
-rw-r--r--src/mscorlib/shared/System/Span.cs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/mscorlib/shared/System/ReadOnlySpan.cs b/src/mscorlib/shared/System/ReadOnlySpan.cs
index 1f00208a09..bfb3498f4e 100644
--- a/src/mscorlib/shared/System/ReadOnlySpan.cs
+++ b/src/mscorlib/shared/System/ReadOnlySpan.cs
@@ -15,6 +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.
/// </summary>
+ [IsReadOnly]
[IsByRefLike]
public struct ReadOnlySpan<T>
{
diff --git a/src/mscorlib/shared/System/Span.cs b/src/mscorlib/shared/System/Span.cs
index 2c467931e6..99fd68d224 100644
--- a/src/mscorlib/shared/System/Span.cs
+++ b/src/mscorlib/shared/System/Span.cs
@@ -22,6 +22,7 @@ namespace System
/// Span 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.
/// </summary>
+ [IsReadOnly]
[IsByRefLike]
public struct Span<T>
{