Ferrous.Annotations
2.3.0
dotnet add package Ferrous.Annotations --version 2.3.0
NuGet\Install-Package Ferrous.Annotations -Version 2.3.0
<PackageReference Include="Ferrous.Annotations" Version="2.3.0" />
<PackageVersion Include="Ferrous.Annotations" Version="2.3.0" />
<PackageReference Include="Ferrous.Annotations" />
paket add Ferrous.Annotations --version 2.3.0
#r "nuget: Ferrous.Annotations, 2.3.0"
#:package Ferrous.Annotations@2.3.0
#addin nuget:?package=Ferrous.Annotations&version=2.3.0
#tool nuget:?package=Ferrous.Annotations&version=2.3.0
Ferrous.Annotations
Roslyn diagnostic analyzer (FE0001) enforcing [MustUse] on methods, constructors, types (including Result<T, TError>, Option<T>, and ScopeGuard), and awaited Task<T> / ValueTask<T> return values—equivalent to Rust's #[must_use] lint.
Installation
dotnet add package Ferrous.Annotations
Quick Example
using Ferrous;
[MustUse("Inspect the error code.")]
int Save() => 0;
Save(); // warning FE0001: Value of 'Save()' must be used: Inspect the error code.
_ = Save(); // OK (explicit discard)
See the MustUse Analyzer Guide and Ferrous Repository for full documentation.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Ferrous.Core (>= 2.3.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Ferrous.Annotations:
| Package | Downloads |
|---|---|
|
Ferrous.CodeFixes
Roslyn IDE code fix providers for Ferrous diagnostics (FE0001, FE0301, FE0400, FE0401, FE0403). |
|
|
Ferrous
Rust-grade compile-time safety, zero-allocation primitives, source generators, and Clippy-style Roslyn analyzers for .NET (polyfilling on .NET 10 and lighting up natively on .NET 11 / C# 15). |
|
|
Ferrous.Testing
Rust-grade testing utilities for .NET: in-memory compile-fail assertions (CompileAssert, like Rust's trybuild), framework-agnostic Result/Option assertions, and zero-allocation assertions (AllocAssert). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.3.0 | 0 | 11/30/2026 |
| 2.2.0 | 0 | 11/30/2026 |
| 2.1.0 | 0 | 11/30/2026 |
| 2.0.0 | 0 | 11/30/2026 |
| 1.7.4 | 0 | 11/30/2026 |
| 1.7.3 | 0 | 11/30/2026 |
| 1.7.2 | 0 | 11/30/2026 |
| 1.7.1 | 0 | 11/30/2026 |
| 1.7.0 | 0 | 11/30/2026 |
| 1.6.0 | 0 | 11/30/2026 |
| 1.5.0 | 0 | 11/30/2026 |
| 1.4.0 | 34 | 11/30/2026 |
| 1.3.3 | 42 | 11/30/2026 |
| 1.3.2 | 36 | 11/30/2026 |
| 1.3.1 | 35 | 11/30/2026 |
| 1.3.0 | 44 | 11/30/2026 |
| 1.2.0 | 55 | 11/30/2026 |