-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
Seems to me if an argument is marked unused (with an underscore) then there should be a warning or error if it is actually used. For example the below compiles and runs just fine:
// rustc --test ignores1.rs && ./ignores1
use std;
fn make_five(_x: int) -> int
{
_x + 5
}
#[test]
fn tester()
{
assert make_five(1) == 5
}
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.