Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Nov 7, 2024
1 parent ee5d7f6 commit 23bc59e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ Reference: [Low Level Struct Improvements](https://github.com/dotnet/csharplang/
<a id='snippet-UnscopedRefUsage.cs'></a>
```cs
using System.Diagnostics.CodeAnalysis;
#pragma warning disable CS0169 // Field is never used
struct UnscopedRefUsage
{
Expand All @@ -334,7 +335,7 @@ struct UnscopedRefUsage
[UnscopedRef] ref int Prop1 => ref field;
}
```
<sup><a href='/src/Consume/UnscopedRefUsage.cs#L1-L8' title='Snippet source file'>snippet source</a> | <a href='#snippet-UnscopedRefUsage.cs' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Consume/UnscopedRefUsage.cs#L1-L9' title='Snippet source file'>snippet source</a> | <a href='#snippet-UnscopedRefUsage.cs' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand Down
2 changes: 1 addition & 1 deletion src/Consume/Consume.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ void ReadOnlySpan_Methods()
var split = readOnlySpan.Split('a');
split = readOnlySpan.Split("a".AsSpan());
#if LangVersion13
split = readOnlySpan.SplitAny('a');
split = readOnlySpan.SplitAny(['a']);
split = readOnlySpan.SplitAny("a".AsSpan());
#endif
}
Expand Down
1 change: 1 addition & 0 deletions src/Consume/UnscopedRefUsage.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics.CodeAnalysis;
#pragma warning disable CS0169 // Field is never used

struct UnscopedRefUsage
{
Expand Down

0 comments on commit 23bc59e

Please sign in to comment.