mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
16 lines
185 B
Rust
16 lines
185 B
Rust
// run-pass
|
|
|
|
use std::ops::AddAssign;
|
|
|
|
struct Int(i32);
|
|
|
|
impl AddAssign<i32> for Int {
|
|
fn add_assign(&mut self, _: i32) {
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let mut x = Int(0);
|
|
x += 1;
|
|
}
|