Use [lints] in Cargo.toml and apply more lints

This commit is contained in:
Taiki Endo
2023-10-31 03:08:57 +09:00
parent 88c52281ad
commit 3ba41e50ff
5 changed files with 121 additions and 50 deletions

View File

@@ -3,3 +3,11 @@
avoid-breaking-exported-api = false
disallowed-names = []
disallowed-macros = [
{ path = "std::dbg", reason = "it is okay to use during development, but please do not include it in main branch" },
]
disallowed-methods = [
{ path = "std::env::remove_var", reason = "this is not thread-safe and inherently unsafe; see <https://github.com/rust-lang/rust/issues/27970> for more" },
{ path = "std::env::set_var", reason = "this is not thread-safe and inherently unsafe; see <https://github.com/rust-lang/rust/issues/27970> for more" },
]
disallowed-types = []