From 22eec53c5ae1f6b14de7217c7ecf81496de5d712 Mon Sep 17 00:00:00 2001 From: Joscha Date: Thu, 21 Nov 2024 02:14:12 +0100 Subject: [PATCH] Move warnings to Cargo.toml --- Cargo.toml | 16 ++++++++++++++++ src/main.rs | 17 ----------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 34106a8..0ae8a9f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,3 +17,19 @@ promptly = "0.3.1" termcolor = "1.2.0" thiserror = "1.0.38" tzfile = { git = "https://github.com/Garmelon/tzfile.git", branch = "tzdir" } + +[lints] +rust.unsafe_code = { level = "forbid", priority = 1 } +rust.future_incompatible = "warn" +rust.rust_2018_idioms = "warn" +rust.noop_method_call = "warn" +rust.single_use_lifetimes = "warn" +rust.trivial_numeric_casts = "warn" +rust.unused = "warn" +rust.unused_crate_dependencies = "warn" +rust.unused_extern_crates = "warn" +rust.unused_import_braces = "warn" +rust.unused_lifetimes = "warn" +rust.unused_qualifications = "warn" +clippy.all = "warn" +clippy.use_self = "warn" diff --git a/src/main.rs b/src/main.rs index 84013df..4897001 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,20 +1,3 @@ -#![deny(unsafe_code)] -// Rustc lint groups -#![warn(future_incompatible)] -#![warn(rust_2018_idioms)] -// Rustc lints -#![warn(noop_method_call)] -#![warn(single_use_lifetimes)] -#![warn(trivial_numeric_casts)] -#![warn(unused_crate_dependencies)] -#![warn(unused_extern_crates)] -#![warn(unused_import_braces)] -#![warn(unused_lifetimes)] -#![warn(unused_qualifications)] -// Clippy lints -#![warn(clippy::all)] -#![warn(clippy::use_self)] - mod cli; mod error; mod eval;