about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorCatherine <114838443+Centri3@users.noreply.github.com>2023-07-06 21:58:11 -0500
committerCatherine <114838443+Centri3@users.noreply.github.com>2023-07-18 10:26:22 -0500
commitf4b3bb19c18cbce910875d6fc97de70005b8dcdb (patch)
treed84b960abfdba63603a3bdd853cca812b7674601 /tests/ui
parent75e1329aac850a15f29a86ac685b3cb4794b8b4f (diff)
downloadrust-f4b3bb19c18cbce910875d6fc97de70005b8dcdb.tar.gz
rust-f4b3bb19c18cbce910875d6fc97de70005b8dcdb.zip
Add `allow_private_error` config option
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/error_impl_error.rs71
-rw-r--r--tests/ui/error_impl_error.stderr45
2 files changed, 0 insertions, 116 deletions
diff --git a/tests/ui/error_impl_error.rs b/tests/ui/error_impl_error.rs
deleted file mode 100644
index d85f9522081..00000000000
--- a/tests/ui/error_impl_error.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-#![allow(unused)]
-#![warn(clippy::error_impl_error)]
-#![no_main]
-
-mod a {
-    #[derive(Debug)]
-    struct Error;
-
-    impl std::fmt::Display for Error {
-        fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-            todo!()
-        }
-    }
-
-    impl std::error::Error for Error {}
-}
-
-mod b {
-    #[derive(Debug)]
-    enum Error {}
-
-    impl std::fmt::Display for Error {
-        fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-            todo!()
-        }
-    }
-
-    impl std::error::Error for Error {}
-}
-
-mod c {
-    union Error {
-        a: u32,
-        b: u32,
-    }
-
-    impl std::fmt::Debug for Error {
-        fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-            todo!()
-        }
-    }
-
-    impl std::fmt::Display for Error {
-        fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-            todo!()
-        }
-    }
-
-    impl std::error::Error for Error {}
-}
-
-mod d {
-    type Error = std::fmt::Error;
-}
-
-mod e {
-    #[derive(Debug)]
-    struct MyError;
-
-    impl std::fmt::Display for MyError {
-        fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-            todo!()
-        }
-    }
-
-    impl std::error::Error for MyError {}
-}
-
-mod f {
-    type MyError = std::fmt::Error;
-}
diff --git a/tests/ui/error_impl_error.stderr b/tests/ui/error_impl_error.stderr
deleted file mode 100644
index 64af0594e0a..00000000000
--- a/tests/ui/error_impl_error.stderr
+++ /dev/null
@@ -1,45 +0,0 @@
-error: type named `Error` that implements `Error`
-  --> $DIR/error_impl_error.rs:7:12
-   |
-LL |     struct Error;
-   |            ^^^^^
-   |
-note: `Error` was implemented here
-  --> $DIR/error_impl_error.rs:15:5
-   |
-LL |     impl std::error::Error for Error {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: `-D clippy::error-impl-error` implied by `-D warnings`
-
-error: type named `Error` that implements `Error`
-  --> $DIR/error_impl_error.rs:20:10
-   |
-LL |     enum Error {}
-   |          ^^^^^
-   |
-note: `Error` was implemented here
-  --> $DIR/error_impl_error.rs:28:5
-   |
-LL |     impl std::error::Error for Error {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: type named `Error` that implements `Error`
-  --> $DIR/error_impl_error.rs:32:11
-   |
-LL |     union Error {
-   |           ^^^^^
-   |
-note: `Error` was implemented here
-  --> $DIR/error_impl_error.rs:49:5
-   |
-LL |     impl std::error::Error for Error {}
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: type alias named `Error` that implements `Error`
-  --> $DIR/error_impl_error.rs:53:10
-   |
-LL |     type Error = std::fmt::Error;
-   |          ^^^^^
-
-error: aborting due to 4 previous errors
-