aboutsummaryrefslogtreecommitdiff
path: root/vendor/thiserror/tests/ui/invalid-input-impl-anyway.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/thiserror/tests/ui/invalid-input-impl-anyway.rs')
-rw-r--r--vendor/thiserror/tests/ui/invalid-input-impl-anyway.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/thiserror/tests/ui/invalid-input-impl-anyway.rs b/vendor/thiserror/tests/ui/invalid-input-impl-anyway.rs
new file mode 100644
index 0000000..0a0bcbe
--- /dev/null
+++ b/vendor/thiserror/tests/ui/invalid-input-impl-anyway.rs
@@ -0,0 +1,11 @@
+use thiserror::Error;
+
+#[derive(Error, Debug)]
+#[error]
+pub struct MyError;
+
+fn main() {
+ // No error on the following line. Thiserror emits an Error impl despite the
+ // bad attribute.
+ _ = &MyError as &dyn std::error::Error;
+}