3 #![allow(non_snake_case)]
5 // There is some other borrowck bug, so we make the stuff not mut.
11 fn SetX(&mut self, _: S);
15 trait Movable<S: Add<Output=S>>: Positioned<S> {
16 fn translate(&mut self, dx: S) {
17 let x = self.X() + dx;
22 struct Point<S> { x: S, y: S }
24 impl<S: Clone> Positioned<S> for Point<S> {
25 fn SetX(&mut self, x: S) {
33 impl<S: Clone + Add<Output=S>> Movable<S> for Point<S> {}
36 let mut p = Point{ x: 1, y: 2};