Unsafe evolution: update RequiresUnsafeAttribute namespace#82813
Conversation
| namespace System.Runtime.CompilerServices | ||
| namespace System.Diagnostics.CodeAnalysis | ||
| { | ||
| [AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Event | AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = false)] |
There was a problem hiding this comment.
Missing AttributeTargets.Field to match BCL definition #WontFix
There was a problem hiding this comment.
That's by design. It was pre-approved by BCL API review if we want to support RequiresUnsafe fields in the future. But it should not be defined until then since we don't produce any errors if RequiresUnsafe is applied on unsupported symbol kinds apart from the AttributeTargets errors.
Let's add Refers to: src/Compilers/Test/Utilities/CSharp/CSharpTestBase.cs:706 in 63a02b8. [](commit_id = 63a02b8, deletion_comment = False) |
jcouv
left a comment
There was a problem hiding this comment.
Done with review pass (commit 1)
Test plan: #81207
API review: dotnet/runtime#125134 (comment)
Microsoft Reviewers: Open in CodeFlow