Skip to content

Use unimplemented! to reference variables, instead of allow(unused_variables) #481

Closed
@petertseng

Description

@petertseng

We desire for our stubs to compile without warnings, as that helps us set a better example and prevent problems like #461 (a stub that provides a u32 where a u64 is needed).

In order for us to get there, these files that have allow(unused_variables) in them should stop using allow(unused_variables) and instead use the model established in #438 #474 and #477, where in the unimplemented! macro we write a message saying what the function should do and reference the arguments.

Here are the files that should be modified as a result of this:

$ git grep unused_variables
exercises/all-your-base/src/lib.rs:#[allow(unused_variables)]
exercises/grade-school/src/lib.rs:#[allow(unused_variables)]
exercises/ocr-numbers/src/lib.rs:#[allow(unused_variables)]
exercises/react/src/lib.rs:#[allow(unused_variables)]
exercises/robot-simulator/src/lib.rs:    #[allow(unused_variables)]
exercises/robot-simulator/src/lib.rs:    #[allow(unused_variables)]
exercises/space-age/src/lib.rs:#![allow(unused_variables)]

You may choose to either work on these one at a time, or send one PR that does this for all the exercises.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueAn improvement or bug fix that favors new contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions