Skip to content

Commit ada85a2

Browse files
committed
rust manual: supertraits seperator is wrong
1 parent 5811d2b commit ada85a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/rust.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,7 @@ trait Circle : Shape { fn radius() -> f64; }
14351435
~~~~
14361436

14371437
the syntax `Circle : Shape` means that types that implement `Circle` must also have an implementation for `Shape`.
1438-
Multiple supertraits are separated by spaces, `trait Circle : Shape Eq { }`.
1438+
Multiple supertraits are separated by `+`, `trait Circle : Shape + Eq { }`.
14391439
In an implementation of `Circle` for a given type `T`, methods can refer to `Shape` methods,
14401440
since the typechecker checks that any type with an implementation of `Circle` also has an implementation of `Shape`.
14411441

0 commit comments

Comments
 (0)