File tree Expand file tree Collapse file tree 9 files changed +8
-18
lines changed Expand file tree Collapse file tree 9 files changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -203,19 +203,21 @@ panic = "abort"
203
203
panic = " abort"
204
204
205
205
[lints .rust ]
206
- # You shouldn't write unsafe code in Rustlings
206
+ # You shouldn't write unsafe code in Rustlings!
207
207
unsafe_code = " forbid"
208
- # You don't need unstable features in Rustlings and shouldn't rely on them while learning Rust
208
+ # You don't need unstable features in Rustlings and shouldn't rely on them while learning Rust.
209
209
unstable_features = " forbid"
210
210
211
211
[lints .clippy ]
212
- # You forgot a `todo!()`
212
+ # You forgot a `todo!()`!
213
213
todo = " forbid"
214
- # This can only happen by mistake in Rustlings
214
+ # This can only happen by mistake in Rustlings.
215
215
empty_loop = " forbid"
216
- # No infinite loops are needed in Rustlings
216
+ # No infinite loops are needed in Rustlings.
217
217
infinite_loop = " deny"
218
- # You shouldn't leak memory while still learning Rust
218
+ # You shouldn't leak memory while still learning Rust!
219
219
mem_forget = " deny"
220
+ # Dead code warnings can't be avoided in some exercises and might distract while learning.
221
+ dead_code = " allow"
220
222
# Currently, there are no disallowed methods. This line avoids problems when developing Rustlings.
221
223
disallowed_methods = " allow"
Original file line number Diff line number Diff line change 1
- #![ allow( dead_code) ]
2
-
3
1
#[ derive( Debug ) ]
4
2
struct Point {
5
3
x : u64 ,
Original file line number Diff line number Diff line change 1
1
// You can bring module paths into scopes and provide new names for them with
2
2
// the `use` and `as` keywords.
3
3
4
- #[ allow( dead_code) ]
5
4
mod delicious_snacks {
6
5
// TODO: Add the following two `use` statements after fixing them.
7
6
// use self::fruits::PEAR as ???;
Original file line number Diff line number Diff line change 1
- #![ allow( dead_code) ]
2
-
3
1
trait Licensed {
4
2
// TODO: Add a default implementation for `licensing_info` so that
5
3
// implementors like the two structs below can share that default behavior
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ use std::rc::Rc;
8
8
#[ derive( Debug ) ]
9
9
struct Sun ;
10
10
11
- #[ allow( dead_code) ]
12
11
#[ derive( Debug ) ]
13
12
enum Planet {
14
13
Mercury ( Rc < Sun > ) ,
Original file line number Diff line number Diff line change 1
- #![ allow( dead_code) ]
2
-
3
1
#[ derive( Debug ) ]
4
2
struct Point {
5
3
x : u64 ,
Original file line number Diff line number Diff line change 1
- #[ allow( dead_code) ]
2
1
mod delicious_snacks {
3
2
// Added `pub` and used the expected alias after `as`.
4
3
pub use self :: fruits:: PEAR as fruit;
Original file line number Diff line number Diff line change 1
- #![ allow( dead_code) ]
2
-
3
1
trait Licensed {
4
2
fn licensing_info ( & self ) -> String {
5
3
"Default license" . to_string ( )
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ use std::rc::Rc;
8
8
#[ derive( Debug ) ]
9
9
struct Sun ;
10
10
11
- #[ allow( dead_code) ]
12
11
#[ derive( Debug ) ]
13
12
enum Planet {
14
13
Mercury ( Rc < Sun > ) ,
You can’t perform that action at this time.
0 commit comments