about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorSeo Sanghyeon <sanxiyn@gmail.com>2015-11-10 20:16:28 +0900
committerSeo Sanghyeon <sanxiyn@gmail.com>2015-11-10 20:16:28 +0900
commit791003ad3c014c1ca12a29d35b4f8530aa4b7b76 (patch)
treeb966a8c8926463991e4677e2164cf87b9ff6cc90 /src/libsyntax/parse
parent5b4986fa5753b9662c8baab1c31b9b79bc84ca19 (diff)
downloadrust-791003ad3c014c1ca12a29d35b4f8530aa4b7b76.tar.gz
rust-791003ad3c014c1ca12a29d35b4f8530aa4b7b76.zip
Use deref coercions
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/classify.rs2
-rw-r--r--src/libsyntax/parse/mod.rs10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs
index d46d078c776..8b3faaaca14 100644
--- a/src/libsyntax/parse/classify.rs
+++ b/src/libsyntax/parse/classify.rs
@@ -53,7 +53,7 @@ pub fn stmt_ends_with_semi(stmt: &ast::Stmt_) -> bool {
                 ast::DeclItem(_) => false
             }
         }
-        ast::StmtExpr(ref e, _) => { expr_requires_semi_to_be_stmt(&**e) }
+        ast::StmtExpr(ref e, _) => { expr_requires_semi_to_be_stmt(e) }
         ast::StmtSemi(..) => { false }
         ast::StmtMac(..) => { false }
     }
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index 5c0ffb770b7..bf65f82554b 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -446,10 +446,10 @@ fn filtered_float_lit(data: token::InternedString, suffix: Option<&str>,
         Some(suf) => {
             if suf.len() >= 2 && looks_like_width_suffix(&['f'], suf) {
                 // if it looks like a width, lets try to be helpful.
-                sd.span_err(sp, &*format!("invalid width `{}` for float literal", &suf[1..]));
+                sd.span_err(sp, &format!("invalid width `{}` for float literal", &suf[1..]));
                 sd.fileline_help(sp, "valid widths are 32 and 64");
             } else {
-                sd.span_err(sp, &*format!("invalid suffix `{}` for float literal", suf));
+                sd.span_err(sp, &format!("invalid suffix `{}` for float literal", suf));
                 sd.fileline_help(sp, "valid suffixes are `f32` and `f64`");
             }
 
@@ -619,11 +619,11 @@ pub fn integer_lit(s: &str,
                 // i<digits> and u<digits> look like widths, so lets
                 // give an error message along those lines
                 if looks_like_width_suffix(&['i', 'u'], suf) {
-                    sd.span_err(sp, &*format!("invalid width `{}` for integer literal",
-                                              &suf[1..]));
+                    sd.span_err(sp, &format!("invalid width `{}` for integer literal",
+                                             &suf[1..]));
                     sd.fileline_help(sp, "valid widths are 8, 16, 32 and 64");
                 } else {
-                    sd.span_err(sp, &*format!("invalid suffix `{}` for numeric literal", suf));
+                    sd.span_err(sp, &format!("invalid suffix `{}` for numeric literal", suf));
                     sd.fileline_help(sp, "the suffix must be one of the integral types \
                                       (`u32`, `isize`, etc)");
                 }