.cargo/vendor/thiserror-1.0.59/tests/test_lints.rs
raw| 1 | #![allow(clippy::mixed_attributes_style)] |
| 2 | |
| 3 | use thiserror::Error; |
| 4 | |
| 5 | pub use std::error::Error; |
| 6 | |
| 7 | #[test] |
| 8 | fn test_unused_qualifications() { |
| 9 | #![deny(unused_qualifications)] |
| 10 | |
| 11 | // Expansion of derive(Error) macro can't know whether something like |
| 12 | // std::error::Error is already imported in the caller's scope so it must |
| 13 | // suppress unused_qualifications. |
| 14 | |
| 15 | #[derive(Debug, Error)] |
| 16 | #[error("...")] |
| 17 | pub struct MyError; |
| 18 | |
| 19 | let _: MyError; |
| 20 | } |