mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-26 15:26:29 +00:00
Add exercise lints
This commit is contained in:
parent
c903db5c53
commit
0b3ad9141b
1 changed files with 16 additions and 0 deletions
|
@ -201,3 +201,19 @@ panic = "abort"
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
panic = "abort"
|
panic = "abort"
|
||||||
|
|
||||||
|
[lints.rust]
|
||||||
|
# You shouldn't write unsafe code in Rustlings
|
||||||
|
unsafe_code = "forbid"
|
||||||
|
# You don't need unstable features in Rustlings and shouldn't rely on them while learning Rust
|
||||||
|
unstable_features = "forbid"
|
||||||
|
|
||||||
|
[lints.clippy]
|
||||||
|
# You forgot a `todo!()`
|
||||||
|
todo = "forbid"
|
||||||
|
# This can only happen by mistake in Rustlings
|
||||||
|
empty_loop = "forbid"
|
||||||
|
# No infinite loops are needed in Rustlings
|
||||||
|
infinite_loop = "deny"
|
||||||
|
# You shouldn't leak memory while still learning Rust
|
||||||
|
mem_forget = "deny"
|
||||||
|
|
Loading…
Reference in a new issue