From d0a0befb541c2381bfb989b83e9038c8568f19fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=86=89=E6=B3=A2?= Date: Fri, 17 Jun 2016 22:54:06 +0800 Subject: [PATCH] Traits where syntax's extra usage example more clearly r? @steveklabnik --- src/doc/book/traits.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/book/traits.md b/src/doc/book/traits.md index 107ef2b44d5eb..e685cb129b939 100644 --- a/src/doc/book/traits.md +++ b/src/doc/book/traits.md @@ -397,10 +397,10 @@ fn normal>(x: &T) -> i64 { } // can be called with T == i64 -fn inverse() -> T +fn inverse(x: i32) -> T // this is using ConvertTo as if it were "ConvertTo" where i32: ConvertTo { - 42.convert() + x.convert() } ```