Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lint for panic!(123) which is not accepted in Rust 2021. #81645

Merged
merged 6 commits into from
Feb 5, 2021

Commits on Feb 3, 2021

  1. Add lint for panic!(123) which is not accepted in Rust 2021.

    This extends the `panic_fmt` lint to warn for all cases where the first
    argument cannot be interpreted as a format string, as will happen in
    Rust 2021.
    
    It suggests to add `"{}", ` to format the message as a string. In the
    case of `std::panic!()`, it also suggests the recently stabilized
    `std::panic::panic_any()` function as an alternative.
    
    It renames the lint to `non_fmt_panic` to match the lint naming
    guidelines.
    m-ou-se committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    a616f82 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    34d5ac2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e9ad5be View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    753b0b0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3f3eb89 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0870c15 View commit details
    Browse the repository at this point in the history