Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/diagnostics.rs')
| -rw-r--r-- | crates/hir/src/diagnostics.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs index 066a322e32..64e982c42d 100644 --- a/crates/hir/src/diagnostics.rs +++ b/crates/hir/src/diagnostics.rs @@ -271,11 +271,17 @@ pub struct PrivateField { pub field: Field, } +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum UnsafeLint { + HardError, + UnsafeOpInUnsafeFn, + DeprecatedSafe2024, +} + #[derive(Debug)] pub struct MissingUnsafe { pub node: InFile<AstPtr<Either<ast::Expr, ast::Pat>>>, - /// If true, the diagnostics is an `unsafe_op_in_unsafe_fn` lint instead of a hard error. - pub only_lint: bool, + pub lint: UnsafeLint, pub reason: UnsafetyReason, } |