2023-01-01 20:08:02 -06:00
|
|
|
fn main() {}
|
|
|
|
|
|
|
|
impl std::ops::AddAssign for () {
|
|
|
|
//~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
|
2024-04-09 05:23:58 -05:00
|
|
|
fn add_assign(&self, other: ()) -> () {
|
2023-01-01 20:08:02 -06:00
|
|
|
()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl std::ops::AddAssign for [(); 1] {
|
|
|
|
//~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
|
2024-04-09 05:23:58 -05:00
|
|
|
fn add_assign(&self, other: [(); 1]) -> [(); 1] {
|
2023-01-01 20:08:02 -06:00
|
|
|
[()]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl std::ops::AddAssign for &[u8] {
|
|
|
|
//~^ ERROR only traits defined in the current crate can be implemented for arbitrary types
|
2024-04-09 05:23:58 -05:00
|
|
|
fn add_assign(&self, other: &[u8]) -> &[u8] {
|
2023-01-01 20:08:02 -06:00
|
|
|
self
|
|
|
|
}
|
|
|
|
}
|