From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/thiserror/tests/test_lints.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 vendor/thiserror/tests/test_lints.rs (limited to 'vendor/thiserror/tests/test_lints.rs') diff --git a/vendor/thiserror/tests/test_lints.rs b/vendor/thiserror/tests/test_lints.rs new file mode 100644 index 000000000..59699a4a3 --- /dev/null +++ b/vendor/thiserror/tests/test_lints.rs @@ -0,0 +1,18 @@ +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; +} -- cgit v1.2.3