]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-67535.rs
Auto merge of #106503 - cjgillot:remap-nofilter, r=oli-obk
[rust.git] / tests / ui / issues / issue-67535.rs
1 fn main() {}
2
3 impl std::ops::AddAssign for () {
4     //~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
5     fn add_assign(&self, other: ()) -> () {
6         ()
7     }
8 }
9
10 impl std::ops::AddAssign for [(); 1] {
11     //~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
12     fn add_assign(&self, other: [(); 1]) -> [(); 1] {
13         [()]
14     }
15 }
16
17 impl std::ops::AddAssign for &[u8] {
18     //~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
19     fn add_assign(&self, other: &[u8]) -> &[u8] {
20         self
21     }
22 }