From 0c68b87717521c0f01a6d220c08330803fa170fb Mon Sep 17 00:00:00 2001 From: LucaCappelletti94 Date: Mon, 8 Jun 2026 12:38:18 +0200 Subject: [PATCH] Forbid unsafe code in both crates --- Cargo.toml | 3 +++ derive/Cargo.toml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 5f3374b739..ea41869535 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,6 +36,9 @@ edition = "2021" name = "sqlparser" path = "src/lib.rs" +[lints.rust] +unsafe_code = "forbid" + [features] default = ["std", "recursive-protection"] std = [] diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 9dfa5daf82..ac3d40589d 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -35,6 +35,9 @@ edition = "2021" [lib] proc-macro = true +[lints.rust] +unsafe_code = "forbid" + [dependencies] syn = { version = "2.0", default-features = false, features = ["full", "printing", "parsing", "derive", "proc-macro", "clone-impls"] } proc-macro2 = "1.0"