rust/src/test/run-pass/augmented-assignments-feature-gate.rs

14 lines
172 B
Rust
Raw Normal View History

2015-09-10 19:16:57 -05:00
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;
}