Skip to content

Commit d1f22f6

Browse files
committed
missing parameter name in Trait Implementations
The example in Trait Implementations was missing a parameter name in a trait method declaration, which is no longer allowed in the 2018 edition.
1 parent f34a622 commit d1f22f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/items/implementations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ keyword.
111111
# struct Point {x: f64, y: f64};
112112
# type Surface = i32;
113113
# struct BoundingBox {x: f64, y: f64, width: f64, height: f64};
114-
# trait Shape { fn draw(&self, Surface); fn bounding_box(&self) -> BoundingBox; }
114+
# trait Shape { fn draw(&self, s: Surface); fn bounding_box(&self) -> BoundingBox; }
115115
# fn do_draw_circle(s: Surface, c: Circle) { }
116116
struct Circle {
117117
radius: f64,

0 commit comments

Comments
 (0)