Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
Resolve used_underscore_items pedantic clippy lint in test
Browse files Browse the repository at this point in the history
    warning: used underscore-prefixed item
       --> tests/test_item.rs:240:21
        |
    240 |                     [<_jit_ $fn>]($arg);
        |                     ^^^^^^^^^^^^^^^^^^^
    ...
    246 |     jit_reexport!(address, node: ());
        |     -------------------------------- in this macro invocation
        |
    note: item is defined here
       --> tests/test_item.rs:234:5
        |
    234 |     fn _jit_address(_node: ()) {}
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_items
        = note: `-W clippy::used-underscore-items` implied by `-W clippy::pedantic`
        = help: to override `-W clippy::pedantic` add `#[allow(clippy::used_underscore_items)]`
        = note: this warning originates in the macro `jit_reexport` (in Nightly builds, run with -Z macro-backtrace for more info)
  • Loading branch information
dtolnay committed Sep 27, 2024
1 parent 6cc0d3f commit 2ee7b01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ mod test_type_in_fn_arg {

use paste::paste;

fn _jit_address(_node: ()) {}
fn jit_address(_node: ()) {}

macro_rules! jit_reexport {
($fn:ident, $arg:ident : $typ:ty) => {
paste! {
pub fn $fn($arg: $typ) {
[<_jit_ $fn>]($arg);
[<jit_ $fn>]($arg);
}
}
};
Expand Down

0 comments on commit 2ee7b01

Please sign in to comment.