diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/auxiliary/issue-3979-traits.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/issues/auxiliary/issue-3979-traits.rs b/src/test/ui/issues/auxiliary/issue-3979-traits.rs new file mode 100644 index 000000000..5d03a0e9e --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-3979-traits.rs @@ -0,0 +1,15 @@ +#![crate_name="issue_3979_traits"] + +#![crate_type = "lib"] + +pub trait Positioned { + fn SetX(&mut self, _: isize); + fn X(&self) -> isize; +} + +pub trait Movable: Positioned { + fn translate(&mut self, dx: isize) { + let x = self.X() + dx; + self.SetX(x); + } +} |