Skip to content

Commit 49192e5

Browse files
committed
moved renamed docs | default-method-simple.rs
1 parent a7268aa commit 49192e5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
//@ run-pass
1+
//! Checks basic default method functionality.
22
3-
#![allow(dead_code)]
3+
//@ run-pass
44

55
trait Foo {
66
fn f(&self) {
@@ -10,9 +10,7 @@ trait Foo {
1010
fn g(&self);
1111
}
1212

13-
struct A {
14-
x: isize
15-
}
13+
struct A;
1614

1715
impl Foo for A {
1816
fn g(&self) {
@@ -21,6 +19,6 @@ impl Foo for A {
2119
}
2220

2321
pub fn main() {
24-
let a = A { x: 1 };
22+
let a = A;
2523
a.f();
2624
}

0 commit comments

Comments
 (0)