thiserror/tests/test_lints.rs
David Tolnay f55a5d28da
Ignore mixed_attributes_style clippy lint
warning: item has both inner and outer attributes
     --> tests/test_lints.rs:5:1
      |
    5 | / #[test]
    6 | | fn test_unused_qualifications() {
    7 | |     #![deny(unused_qualifications)]
      | |___________________________________^
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mixed_attributes_style
      = note: `#[warn(clippy::mixed_attributes_style)]` on by default
2024-03-07 22:31:43 -08:00

20 lines
460 B
Rust

#![allow(clippy::mixed_attributes_style)]
use thiserror::Error;
pub use std::error::Error;
#[test]
fn test_unused_qualifications() {
#![deny(unused_qualifications)]
// Expansion of derive(Error) macro can't know whether something like
// std::error::Error is already imported in the caller's scope so it must
// suppress unused_qualifications.
#[derive(Debug, Error)]
#[error("...")]
pub struct MyError;
let _: MyError;
}