Skip to content

Commit

Permalink
Fix #31: [MustDisposeResource] is not allowed on struct types
Browse files Browse the repository at this point in the history
  • Loading branch information
controlflow committed Jul 5, 2024
1 parent 5966560 commit c58cea6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
/.vs/
*.snk
/.idea/
/_ReSharper.Caches/**
/_ReSharper.Caches/**
*.dotSettings.user
3 changes: 2 additions & 1 deletion src/Annotations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,8 @@ public MustUseReturnValueAttribute([NotNull] string justification)
/// to a parameter annotated with the <see cref="HandlesResourceDisposalAttribute"/> attribute.
/// </remarks>
[AttributeUsage(
AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Parameter)]
AttributeTargets.Class | AttributeTargets.Struct |
AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Parameter)]
[Conditional("JETBRAINS_ANNOTATIONS")]
public sealed class MustDisposeResourceAttribute : Attribute
{
Expand Down

0 comments on commit c58cea6

Please sign in to comment.