Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/System.Private.CoreLib/shared/System/Globalization/TimeSpanParse.cs12
-rw-r--r--src/System.Private.CoreLib/shared/System/ReadOnlySpan.cs4
-rw-r--r--src/System.Private.CoreLib/shared/System/Span.cs4
3 files changed, 6 insertions, 14 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Globalization/TimeSpanParse.cs b/src/System.Private.CoreLib/shared/System/Globalization/TimeSpanParse.cs
index f8443a1ea..cf6a929cc 100644
--- a/src/System.Private.CoreLib/shared/System/Globalization/TimeSpanParse.cs
+++ b/src/System.Private.CoreLib/shared/System/Globalization/TimeSpanParse.cs
@@ -93,8 +93,7 @@ namespace System.Globalization
NumOverflow = 4, // Number that overflowed
}
- [IsByRefLike]
- private struct TimeSpanToken
+ private ref struct TimeSpanToken
{
internal TTT _ttt;
internal int _num; // Store the number that we are parsing (if any)
@@ -131,8 +130,7 @@ namespace System.Globalization
}
}
- [IsByRefLike]
- private struct TimeSpanTokenizer
+ private ref struct TimeSpanTokenizer
{
private ReadOnlySpan<char> _value;
private int _pos;
@@ -241,8 +239,7 @@ namespace System.Globalization
}
/// <summary>Stores intermediary parsing state for the standard formats.</summary>
- [IsByRefLike]
- private struct TimeSpanRawInfo
+ private ref struct TimeSpanRawInfo
{
internal TimeSpanFormat.FormatLiterals PositiveInvariant => TimeSpanFormat.PositiveInvariantFormatLiterals;
internal TimeSpanFormat.FormatLiterals NegativeInvariant => TimeSpanFormat.NegativeInvariantFormatLiterals;
@@ -1430,8 +1427,7 @@ namespace System.Globalization
private static bool TryParseTimeSpanConstant(ReadOnlySpan<char> input, ref TimeSpanResult result) =>
new StringParser().TryParse(input, ref result);
- [IsByRefLike]
- private struct StringParser
+ private ref struct StringParser
{
private ReadOnlySpan<char> _str;
private char _ch;
diff --git a/src/System.Private.CoreLib/shared/System/ReadOnlySpan.cs b/src/System.Private.CoreLib/shared/System/ReadOnlySpan.cs
index 4e1910df6..c5f301a6f 100644
--- a/src/System.Private.CoreLib/shared/System/ReadOnlySpan.cs
+++ b/src/System.Private.CoreLib/shared/System/ReadOnlySpan.cs
@@ -16,10 +16,8 @@ namespace System
/// or native memory, or to memory allocated on the stack. It is type- and memory-safe.
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
- [IsReadOnly]
- [IsByRefLike]
[NonVersionable]
- public struct ReadOnlySpan<T>
+ public readonly ref struct ReadOnlySpan<T>
{
/// <summary>A byref or a native ptr.</summary>
private readonly ByReference<T> _pointer;
diff --git a/src/System.Private.CoreLib/shared/System/Span.cs b/src/System.Private.CoreLib/shared/System/Span.cs
index f4f4e571d..261b15c07 100644
--- a/src/System.Private.CoreLib/shared/System/Span.cs
+++ b/src/System.Private.CoreLib/shared/System/Span.cs
@@ -22,10 +22,8 @@ namespace System
/// or native memory, or to memory allocated on the stack. It is type- and memory-safe.
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
- [IsReadOnly]
- [IsByRefLike]
[NonVersionable]
- public struct Span<T>
+ public readonly ref struct Span<T>
{
/// <summary>A byref or a native ptr.</summary>
private readonly ByReference<T> _pointer;