]> git.proxmox.com Git - rustc.git/blobdiff - src/test/auxiliary/go_trait.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / test / auxiliary / go_trait.rs
index 0a921c8f5b3a0b1eb8fe6110786cf19a49977ba5..044bb606b40e224b15a0dd6766a72f4e1fec9155 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(specialization)]
+
 // Common code used for tests that model the Fn/FnMut/FnOnce hierarchy.
 
 pub trait Go {
@@ -37,7 +39,7 @@ pub fn go_once<G:GoOnce>(this: G, arg: isize) {
 impl<G> GoMut for G
     where G : Go
 {
-    fn go_mut(&mut self, arg: isize) {
+    default fn go_mut(&mut self, arg: isize) {
         go(&*self, arg)
     }
 }
@@ -45,7 +47,7 @@ impl<G> GoMut for G
 impl<G> GoOnce for G
     where G : GoMut
 {
-    fn go_once(mut self, arg: isize) {
+    default fn go_once(mut self, arg: isize) {
         go_mut(&mut self, arg)
     }
 }