aaronabramov / k9

Rust testing library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warnings in Rust 1.51

wez opened this issue · comments

warning: panic message is not a string literal
   --> term/src/test/mod.rs:366:5
    |
366 | /     k9::snapshot!(
367 | |         term.get_semantic_zones().unwrap(),
368 | |         "
369 | | [
...   |
378 | | "
379 | |     );
    | |______^
    |
    = note: `#[warn(non_fmt_panic)]` on by default
    = note: this is no longer accepted in Rust 2021
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

and similarly for the assert_equals macro, which I've aliased here:

warning: panic message is not a string literal
   --> wezterm-font/src/shaper/harfbuzz.rs:512:13
    |
512 | /             assert_eq!(
513 | |                 info,
514 | |                 vec![GlyphInfo {
515 | |                     cluster: 0,
...   |
526 | |                 },]
527 | |             );
    | |______________^
    |
    = note: this is no longer accepted in Rust 2021
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

thanks for flagging! yeah, it seems like it's breaking in the latest nightly

fix #115

Thanks! FWIW, Rust 1.51 was released today, so it's not just the nightly! :)

right! i should probably fail on warnings in a continuous build to make sure these are caught in advance in the future 😅