From 3ed18bdd42e10f57890befe015f6861d52429e12 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 22 Oct 2013 08:10:34 -0700 Subject: [PATCH] Remove old logging from the tutorial --- doc/rust.md | 28 ++++++++++++++-------------- doc/tutorial-macros.md | 6 +++--- doc/tutorial.md | 8 ++++---- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/doc/rust.md b/doc/rust.md index e17f8ed890b..2d4b0c15cb8 100644 --- a/doc/rust.md +++ b/doc/rust.md @@ -700,15 +700,15 @@ mod math { type complex = (f64, f64); fn sin(f: f64) -> f64 { ... -# fail2!(); +# fail!(); } fn cos(f: f64) -> f64 { ... -# fail2!(); +# fail!(); } fn tan(f: f64) -> f64 { ... -# fail2!(); +# fail!(); } } ~~~~ @@ -1059,8 +1059,8 @@ output slot type would normally be. For example: ~~~~ fn my_err(s: &str) -> ! { - info2!("{}", s); - fail2!(); + info!("{}", s); + fail!(); } ~~~~ @@ -1078,7 +1078,7 @@ were declared without the `!` annotation, the following code would not typecheck: ~~~~ -# fn my_err(s: &str) -> ! { fail2!() } +# fn my_err(s: &str) -> ! { fail!() } fn f(i: int) -> int { if i == 42 { @@ -2826,9 +2826,9 @@ enum List { Nil, Cons(X, @List) } let x: List = Cons(10, @Cons(11, @Nil)); match x { - Cons(_, @Nil) => fail2!("singleton list"), + Cons(_, @Nil) => fail!("singleton list"), Cons(*) => return, - Nil => fail2!("empty list") + Nil => fail!("empty list") } ~~~~ @@ -2864,7 +2864,7 @@ match x { return; } _ => { - fail2!(); + fail!(); } } ~~~~ @@ -2918,7 +2918,7 @@ guard may refer to the variables bound within the pattern they follow. let message = match maybe_digit { Some(x) if x < 10 => process_digit(x), Some(x) => process_other(x), - None => fail2!() + None => fail!() }; ~~~~ @@ -3669,10 +3669,10 @@ that demonstrates all four of them: ~~~~ fn main() { - error2!("This is an error log") - warn2!("This is a warn log") - info2!("this is an info log") - debug2!("This is a debug log") + error!("This is an error log") + warn!("This is a warn log") + info!("this is an info log") + debug!("This is a debug log") } ~~~~ diff --git a/doc/tutorial-macros.md b/doc/tutorial-macros.md index a70b29f9100..f1f4ade0542 100644 --- a/doc/tutorial-macros.md +++ b/doc/tutorial-macros.md @@ -226,7 +226,7 @@ match x { // complicated stuff goes here return result + val; }, - _ => fail2!("Didn't get good_2") + _ => fail!("Didn't get good_2") } } _ => return 0 // default value @@ -268,7 +268,7 @@ macro_rules! biased_match ( biased_match!((x) ~ (good_1(g1, val)) else { return 0 }; binds g1, val ) biased_match!((g1.body) ~ (good_2(result) ) - else { fail2!("Didn't get good_2") }; + else { fail!("Didn't get good_2") }; binds result ) // complicated stuff goes here return result + val; @@ -369,7 +369,7 @@ macro_rules! biased_match ( # fn f(x: t1) -> uint { biased_match!( (x) ~ (good_1(g1, val)) else { return 0 }; - (g1.body) ~ (good_2(result) ) else { fail2!("Didn't get good_2") }; + (g1.body) ~ (good_2(result) ) else { fail!("Didn't get good_2") }; binds val, result ) // complicated stuff goes here return result + val; diff --git a/doc/tutorial.md b/doc/tutorial.md index 51a2e6eb384..42617a96daa 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -763,7 +763,7 @@ unit, `()`, as the empty tuple if you like). ~~~~ let mytup: (int, int, f64) = (10, 20, 30.0); match mytup { - (a, b, c) => info2!("{}", a + b + (c as int)) + (a, b, c) => info!("{}", a + b + (c as int)) } ~~~~ @@ -779,7 +779,7 @@ For example: struct MyTup(int, int, f64); let mytup: MyTup = MyTup(10, 20, 30.0); match mytup { - MyTup(a, b, c) => info2!("{}", a + b + (c as int)) + MyTup(a, b, c) => info!("{}", a + b + (c as int)) } ~~~~ @@ -1576,7 +1576,7 @@ arguments. use std::task::spawn; do spawn() || { - debug2!("I'm a task, whatever"); + debug!("I'm a task, whatever"); } ~~~~ @@ -1588,7 +1588,7 @@ may be omitted from `do` expressions. use std::task::spawn; do spawn { - debug2!("Kablam!"); + debug!("Kablam!"); } ~~~~