]> git.lizzy.rs Git - rust.git/blobdiff - doc/tutorial.md
Merge remote-tracking branch 'erickt/master'
[rust.git] / doc / tutorial.md
index 29862e7ba5b6f4a5673728d5c33672fbd41bdf9f..ad6dd68d82392e3ffab871d3316fe474608a6b7f 100644 (file)
@@ -473,13 +473,6 @@ The comparison operators are the traditional `==`, `!=`, `<`, `>`,
 `<=`, and `>=`. Short-circuiting (lazy) boolean operators are written
 `&&` (and) and `||` (or).
 
-Rust has a ternary conditional operator `?:`, as in:
-
-~~~~
-let badness = 12;
-let message = badness < 10 ? "error" : "FATAL ERROR";
-~~~~
-
 For type casting, Rust uses the binary `as` operator, which has a
 precedence between the bitwise combination operators (`&`, `|`, `^`)
 and the comparison operators. It takes an expression on the left side,
@@ -1792,6 +1785,7 @@ fn world() -> str { "world" }
 ~~~~
 ## ignore
 // main.rs
+use std;
 use mylib;
 fn main() { std::io::println("hello " + mylib::world()); }
 ~~~~