about summary refs log tree commit diff
path: root/src/doc/rust.md
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-04-01 13:26:49 -0700
committerbors <bors@rust-lang.org>2014-04-01 13:26:49 -0700
commit1217cfb9e7e449c9ef5ee0844e7d3be324648f02 (patch)
treece831ee4530348b32b5ccbb6c0dfa1d15df3279e /src/doc/rust.md
parentb71c02e512fcfe18ea7a5a8a99ac758b4fa564a6 (diff)
parent5e12e1b1a49134f578e1778f4a1216221417bc5e (diff)
downloadrust-1217cfb9e7e449c9ef5ee0844e7d3be324648f02.tar.gz
rust-1217cfb9e7e449c9ef5ee0844e7d3be324648f02.zip
auto merge of #13225 : thestinger/rust/num, r=cmr
The `Float` trait methods will be usable as functions via UFCS, and
we came to a consensus to remove duplicate functions like this a long
time ago.

It does still make sense to keep the duplicate functions when the trait
methods are static, unless the decision to leave out the in-scope trait
name resolution for static methods changes.
Diffstat (limited to 'src/doc/rust.md')
-rw-r--r--src/doc/rust.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/rust.md b/src/doc/rust.md
index 98db4cb5367..9e211dda2fb 100644
--- a/src/doc/rust.md
+++ b/src/doc/rust.md
@@ -826,14 +826,14 @@ Use declarations support a number of convenient shortcuts:
 An example of `use` declarations:
 
 ~~~~
-use std::num::sin;
+use std::iter::range_step;
 use std::option::{Some, None};
 
 # fn foo<T>(_: T){}
 
 fn main() {
-    // Equivalent to 'std::num::sin(1.0);'
-    sin(1.0);
+    // Equivalent to 'std::iter::range_step(0, 10, 2);'
+    range_step(0, 10, 2);
 
     // Equivalent to 'foo(~[std::option::Some(1.0), std::option::None]);'
     foo(~[Some(1.0), None]);