Skip to content

New nightly compiler warnings #103

Closed
@ldm0

Description

@ldm0

e.g.

pub fn foo() {
    version_sync::assert_markdown_deps_updated!("README.md");
    version_sync::assert_html_root_url_updated!("src/lib.rs");
}

Compiler warnings:

warning: panic message is not a string literal
 --> src/main.rs:3:5
  |
3 |     version_sync::assert_markdown_deps_updated!("README.md");
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = 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)

warning: panic message is not a string literal
 --> src/main.rs:4:5
  |
4 |     version_sync::assert_html_root_url_updated!("src/lib.rs");
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = 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)

warning: 2 warnings emitted

Change panic!(err) to panic!("{}", err) will fix this issue. Check rust-lang/rust#81645.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions