]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/trait-default-method-bound.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / trait-default-method-bound.rs
index ab2f1928d1f30587a1b8f192bf124ae72dade373..1505d48839e45f6e3248425aac46674657846eaa 100644 (file)
@@ -8,18 +8,17 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[allow(default_methods)];
 
 trait A {
-    fn g() -> int { 10 }
+    fn g(&self) -> int { 10 }
 }
 
 impl A for int { }
 
-fn f<T: A>(i: T) {
-    assert i.g() == 10;
+fn f<T:A>(i: T) {
+    assert_eq!(i.g(), 10);
 }
 
 pub fn main () {
-    f(0);
+    f(0i);
 }