Skip to content

Commit

Permalink
Rollup merge of rust-lang#34328 - wuranbo:patch-1, r=steveklabnik
Browse files Browse the repository at this point in the history
Traits where syntax's extra usage example more clearly

r? @steveklabnik
  • Loading branch information
GuillaumeGomez authored Jun 28, 2016
2 parents be1c2b9 + d0a0bef commit 47ef866
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/book/traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,10 @@ fn normal<T: ConvertTo<i64>>(x: &T) -> i64 {
}

// can be called with T == i64
fn inverse<T>() -> T
fn inverse<T>(x: i32) -> T
// this is using ConvertTo as if it were "ConvertTo<i64>"
where i32: ConvertTo<T> {
42.convert()
x.convert()
}
```

Expand Down

0 comments on commit 47ef866

Please sign in to comment.