about summary refs log tree commit diff
path: root/tests/ui/issues/issue-67535.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-67535.rs')
-rw-r--r--tests/ui/issues/issue-67535.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-67535.rs b/tests/ui/issues/issue-67535.rs
new file mode 100644
index 00000000000..24f50621310
--- /dev/null
+++ b/tests/ui/issues/issue-67535.rs
@@ -0,0 +1,22 @@
+fn main() {}
+
+impl std::ops::AddAssign for () {
+    //~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
+    fn add_assign(&self, other: ()) -> () {
+        ()
+    }
+}
+
+impl std::ops::AddAssign for [(); 1] {
+    //~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
+    fn add_assign(&self, other: [(); 1]) -> [(); 1] {
+        [()]
+    }
+}
+
+impl std::ops::AddAssign for &[u8] {
+    //~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
+    fn add_assign(&self, other: &[u8]) -> &[u8] {
+        self
+    }
+}