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

Commit

Permalink
Ignore uninlined_format_args pedantic clippy lint
Browse files Browse the repository at this point in the history
    warning: variables can be used directly in the `format!` string
       --> src/dumper.rs:261:5
        |
    261 |     write!(WriteToPtr::new(anchor), "id{:03}\0", anchor_id);
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    note: the lint level is defined here
       --> src/lib.rs:10:9
        |
    10  | #![warn(clippy::pedantic)]
        |         ^^^^^^^^^^^^^^^^
        = note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::pedantic)]`
    help: change this to
        |
    261 -     write!(WriteToPtr::new(anchor), "id{:03}\0", anchor_id);
    261 +     write!(WriteToPtr::new(anchor), "id{anchor_id:03}\0");
        |

    warning: variables can be used directly in the `format!` string
       --> src/bin/run-parser-test-suite.rs:217:21
        |
    217 |             let _ = writeln!(io::stderr(), "{}", err);
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    note: the lint level is defined here
       --> src/bin/run-parser-test-suite.rs:1:9
        |
    1   | #![warn(clippy::pedantic)]
        |         ^^^^^^^^^^^^^^^^
        = note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::pedantic)]`
    help: change this to
        |
    217 -             let _ = writeln!(io::stderr(), "{}", err);
    217 +             let _ = writeln!(io::stderr(), "{err}");
        |

    warning: variables can be used directly in the `format!` string
       --> src/bin/run-emitter-test-suite.rs:302:21
        |
    302 |             let _ = writeln!(io::stderr(), "{}", err);
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    note: the lint level is defined here
       --> src/bin/run-emitter-test-suite.rs:1:9
        |
    1   | #![warn(clippy::pedantic)]
        |         ^^^^^^^^^^^^^^^^
        = note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::pedantic)]`
    help: change this to
        |
    302 -             let _ = writeln!(io::stderr(), "{}", err);
    302 +             let _ = writeln!(io::stderr(), "{err}");
        |

    warning: variables can be used directly in the `format!` string
       --> src/bin/run-parser-test-suite.rs:217:21
        |
    217 |             let _ = writeln!(io::stderr(), "{}", err);
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    note: the lint level is defined here
       --> src/bin/run-parser-test-suite.rs:1:9
        |
    1   | #![warn(clippy::pedantic)]
        |         ^^^^^^^^^^^^^^^^
        = note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::pedantic)]`
    help: change this to
        |
    217 -             let _ = writeln!(io::stderr(), "{}", err);
    217 +             let _ = writeln!(io::stderr(), "{err}");
        |

    warning: variables can be used directly in the `format!` string
      --> tests/test_parser_error.rs:25:9
       |
    25 |         eprint!("{}", stdout);
       |         ^^^^^^^^^^^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
       = note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic`
       = help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]`
    help: change this to
       |
    25 -         eprint!("{}", stdout);
    25 +         eprint!("{stdout}");
       |

    warning: variables can be used directly in the `format!` string
      --> tests/test_parser_error.rs:26:9
       |
    26 |         eprint!("{}", stderr);
       |         ^^^^^^^^^^^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    help: change this to
       |
    26 -         eprint!("{}", stderr);
    26 +         eprint!("{stderr}");
       |

    warning: variables can be used directly in the `format!` string
      --> tests/test_parser.rs:25:5
       |
    25 |     eprint!("{}", stderr);
       |     ^^^^^^^^^^^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
       = note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic`
       = help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]`
    help: change this to
       |
    25 -     eprint!("{}", stderr);
    25 +     eprint!("{stderr}");
       |

    warning: variables can be used directly in the `format!` string
       --> src/bin/run-emitter-test-suite.rs:302:21
        |
    302 |             let _ = writeln!(io::stderr(), "{}", err);
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    note: the lint level is defined here
       --> src/bin/run-emitter-test-suite.rs:1:9
        |
    1   | #![warn(clippy::pedantic)]
        |         ^^^^^^^^^^^^^^^^
        = note: `#[warn(clippy::uninlined_format_args)]` implied by `#[warn(clippy::pedantic)]`
    help: change this to
        |
    302 -             let _ = writeln!(io::stderr(), "{}", err);
    302 +             let _ = writeln!(io::stderr(), "{err}");
        |

    warning: variables can be used directly in the `format!` string
      --> tests/test_emitter.rs:25:5
       |
    25 |     eprint!("{}", stderr);
       |     ^^^^^^^^^^^^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
       = note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic`
       = help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]`
    help: change this to
       |
    25 -     eprint!("{}", stderr);
    25 +     eprint!("{stderr}");
       |
  • Loading branch information
dtolnay committed Mar 21, 2024
1 parent 230e919 commit 417668c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/bin/run-emitter-test-suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
clippy::ptr_as_ptr,
clippy::single_match_else,
clippy::too_many_lines,
clippy::uninlined_format_args,
clippy::unreadable_literal
)]

Expand Down
3 changes: 2 additions & 1 deletion src/bin/run-parser-test-suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
clippy::let_underscore_untyped,
clippy::missing_errors_doc,
clippy::missing_safety_doc,
clippy::too_many_lines
clippy::too_many_lines,
clippy::uninlined_format_args
)]

mod cstr;
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
clippy::single_match_else,
clippy::too_many_arguments,
clippy::too_many_lines,
clippy::uninlined_format_args,
clippy::unnecessary_cast,
clippy::unreadable_literal,
clippy::while_immutable_condition, // https://github.com/rust-lang/rust-clippy/issues/3548
Expand Down
2 changes: 1 addition & 1 deletion tests/test_emitter.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::type_complexity)]
#![allow(clippy::type_complexity, clippy::uninlined_format_args)]

mod bin;
#[path = "../src/bin/run-emitter-test-suite.rs"]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parser.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::type_complexity)]
#![allow(clippy::type_complexity, clippy::uninlined_format_args)]

mod bin;
#[path = "../src/bin/run-parser-test-suite.rs"]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parser_error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::type_complexity)]
#![allow(clippy::type_complexity, clippy::uninlined_format_args)]

mod bin;
#[path = "../src/bin/run-parser-test-suite.rs"]
Expand Down

0 comments on commit 417668c

Please sign in to comment.