Skip to content

Commit 21f2f15

Browse files
committed
Rollup merge of rust-lang#28184 - xiaochuanyu:patch-1, r=alexcrichton
Originally in an example it reads as follows: ```rust fn inverse<T>() -> T // this is using ConvertTo as if it were "ConvertFrom<i32>" where i32: ConvertTo<T> { 42.convert() } ``` There was no mention of `ConvertFrom` elsewhere in the page other than in this comment. Is this supposed to be `ConvertTo<i64>` ? I'm confused by this example.
2 parents 6ec5ade + 865d6c3 commit 21f2f15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/trpl/traits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ fn normal<T: ConvertTo<i64>>(x: &T) -> i64 {
390390

391391
// can be called with T == i64
392392
fn inverse<T>() -> T
393-
// this is using ConvertTo as if it were "ConvertFrom<i32>"
393+
// this is using ConvertTo as if it were "ConvertTo<i64>"
394394
where i32: ConvertTo<T> {
395395
42.convert()
396396
}

0 commit comments

Comments
 (0)