about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-20 12:35:51 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-20 12:35:51 -0800
commit631896dc1996d239a532b0ce02d5fe886660149e (patch)
tree2cc34760c310fdc65830ea29123c553b02adc790
parenteace6afed224e57708b9fd9c7e11542c480b7562 (diff)
downloadrust-631896dc1996d239a532b0ce02d5fe886660149e.tar.gz
rust-631896dc1996d239a532b0ce02d5fe886660149e.zip
Test fixes and rebase conflicts
-rw-r--r--src/doc/reference.md10
-rw-r--r--src/libsyntax/parse/mod.rs4
2 files changed, 6 insertions, 8 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index a1954bfdbc8..d3af4ab1c74 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -485,7 +485,7 @@ Examples of integer literals of various forms:
 ```
 123is;                             // type isize
 123us;                             // type usize
-123_us                             // type usize
+123_us;                            // type usize
 0xff_u8;                           // type u8
 0o70_i16;                          // type i16
 0b1111_1111_1001_0000_i32;         // type i32
@@ -1500,11 +1500,11 @@ Constants should in general be preferred over statics, unless large amounts of
 data are being stored, or single-address and mutability properties are required.
 
 ```
-use std::sync::atomic::{AtomicUint, Ordering, ATOMIC_USIZE_INIT};;
+use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
 
 // Note that ATOMIC_USIZE_INIT is a *const*, but it may be used to initialize a
 // static. This static can be modified, so it is not placed in read-only memory.
-static COUNTER: AtomicUint = ATOMIC_USIZE_INIT;
+static COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
 
 // This table is a candidate to be placed in read-only memory.
 static TABLE: &'static [usize] = &[1, 2, 3, /* ... */];
@@ -3437,8 +3437,8 @@ fn is_symmetric(list: &[u32]) -> bool {
 }
 
 fn main() {
-    let sym     = &[0us, 1, 4, 2, 4, 1, 0];
-    let not_sym = &[0us, 1, 7, 2, 4, 1, 0];
+    let sym     = &[0, 1, 4, 2, 4, 1, 0];
+    let not_sym = &[0, 1, 7, 2, 4, 1, 0];
     assert!(is_symmetric(sym));
     assert!(!is_symmetric(not_sym));
 }
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index 8a5a0b0fce7..dd376fe9e10 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -253,10 +253,8 @@ pub fn file_to_filemap(sess: &ParseSess, path: &Path, spanopt: Option<Span>)
     let bytes = match File::open(path).read_to_end() {
         Ok(bytes) => bytes,
         Err(e) => {
-            let error_msg = e.desc;
             err(&format!("couldn't read {:?}: {}",
-                        path.display(),
-                        error_msg)[]);
+                        path.display(), e)[]);
             unreachable!()
         }
     };