Skip to content

Commit cfe6fe6

Browse files
committed
---
yaml --- r: 186999 b: refs/heads/try c: ef42c2b h: refs/heads/master i: 186997: 41de127 186995: 2d58511 186991: dc750c3 v: v3
1 parent a4bb354 commit cfe6fe6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: b4c965ee803a4521d8b4575f634e036f93e408f3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5-
refs/heads/try: d801a4da7cc8672c3b7655ccad218ab892b8dd9b
5+
refs/heads/try: ef42c2befd9451cd913de60539487a483ae9deac
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/doc/reference.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ the final namespace qualifier is omitted.
576576
Two examples of paths with type arguments:
577577

578578
```
579-
# struct HashMap<K, V>;
579+
# struct HashMap<K, V>(K,V);
580580
# fn f() {
581581
# fn id<T>(t: T) -> T { t }
582582
type T = HashMap<i32,String>; // Type arguments used in a type expression
@@ -1603,7 +1603,7 @@ pointer values (pointing to a type for which an implementation of the given
16031603
trait is in scope) to pointers to the trait name, used as a type.
16041604

16051605
```
1606-
# trait Shape { }
1606+
# trait Shape { fn dummy(&self) { } }
16071607
# impl Shape for i32 { }
16081608
# let mycircle = 0i32;
16091609
let myshape: Box<Shape> = Box::new(mycircle) as Box<Shape>;
@@ -1634,8 +1634,8 @@ let x: f64 = Num::from_i32(42);
16341634
Traits may inherit from other traits. For example, in
16351635

16361636
```
1637-
trait Shape { fn area() -> f64; }
1638-
trait Circle : Shape { fn radius() -> f64; }
1637+
trait Shape { fn area(&self) -> f64; }
1638+
trait Circle : Shape { fn radius(&self) -> f64; }
16391639
```
16401640

16411641
the syntax `Circle : Shape` means that types that implement `Circle` must also
@@ -1729,7 +1729,7 @@ type parameters taken by the trait it implements. Implementation parameters
17291729
are written after the `impl` keyword.
17301730

17311731
```
1732-
# trait Seq<T> { }
1732+
# trait Seq<T> { fn dummy(&self, _: T) { } }
17331733
impl<T> Seq<T> for Vec<T> {
17341734
/* ... */
17351735
}

0 commit comments

Comments
 (0)