diff --git a/tests/ui/used_underscore_binding.rs b/tests/ui/used_underscore_binding.rs index fe0db6346ca..21d91bab689 100644 --- a/tests/ui/used_underscore_binding.rs +++ b/tests/ui/used_underscore_binding.rs @@ -20,11 +20,8 @@ fn prefix_underscore(_foo: u32) -> u32 { /// Test that we lint if we use a `_`-variable defined outside within a macro expansion fn in_macro(_foo: u32) { println!("{}", _foo); - assert_eq!(_foo, _foo); - - test_macro!() + 1; } diff --git a/tests/ui/used_underscore_binding.stderr b/tests/ui/used_underscore_binding.stderr index 35179ac3703..f532b4c9022 100644 --- a/tests/ui/used_underscore_binding.stderr +++ b/tests/ui/used_underscore_binding.stderr @@ -17,21 +17,21 @@ error: used binding `_foo` which is prefixed with an underscore. A leading under | ^^^^ error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used. - --> $DIR/used_underscore_binding.rs:24:16 + --> $DIR/used_underscore_binding.rs:23:16 | -24 | assert_eq!(_foo, _foo); +23 | assert_eq!(_foo, _foo); | ^^^^ error: used binding `_foo` which is prefixed with an underscore. A leading underscore signals that a binding will not be used. - --> $DIR/used_underscore_binding.rs:24:22 + --> $DIR/used_underscore_binding.rs:23:22 | -24 | assert_eq!(_foo, _foo); +23 | assert_eq!(_foo, _foo); | ^^^^ error: used binding `_underscore_field` which is prefixed with an underscore. A leading underscore signals that a binding will not be used. - --> $DIR/used_underscore_binding.rs:39:5 + --> $DIR/used_underscore_binding.rs:36:5 | -39 | s._underscore_field += 1; +36 | s._underscore_field += 1; | ^^^^^^^^^^^^^^^^^^^ error: aborting due to 5 previous errors