about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-11-02 23:10:09 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-11-03 11:02:36 -0800
commitdce0be03d94360d100825c134892e78c39858ef8 (patch)
treedca9b3f476907c8c6addc7ec1afb01c789c6d330
parent02300dc90d4199724f46f6246b57cb10a1288910 (diff)
downloadrust-dce0be03d94360d100825c134892e78c39858ef8.tar.gz
rust-dce0be03d94360d100825c134892e78c39858ef8.zip
Test fixes and rebase conflicts
-rw-r--r--src/librustc/metadata/creader.rs2
-rw-r--r--src/libsyntax/ext/base.rs4
-rw-r--r--src/test/compile-fail/extoption_env-not-string-literal.rs2
-rw-r--r--src/test/compile-fail/non-constant-expr-for-fixed-len-vec.rs2
-rw-r--r--src/test/run-pass/issue-18464.rs2
-rw-r--r--src/test/run-pass/macro-include-items.rs2
6 files changed, 11 insertions, 3 deletions
diff --git a/src/librustc/metadata/creader.rs b/src/librustc/metadata/creader.rs
index 541d6a67b4e..797bc5814fc 100644
--- a/src/librustc/metadata/creader.rs
+++ b/src/librustc/metadata/creader.rs
@@ -238,7 +238,7 @@ fn visit_item(e: &Env, i: &ast::Item) {
                                 if k.equiv(&("static")) {
                                     cstore::NativeStatic
                                 } else if k.equiv(&("framework")) {
-                                    cstore::NativeUnknown
+                                    cstore::NativeFramework
                                 } else {
                                     e.sess.span_err(m.span,
                                         format!("unknown kind: `{}`",
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs
index bd6df9cb497..152b89b86e7 100644
--- a/src/libsyntax/ext/base.rs
+++ b/src/libsyntax/ext/base.rs
@@ -681,6 +681,10 @@ pub fn get_single_str_from_tts(cx: &mut ExtCtxt,
                                name: &str)
                                -> Option<String> {
     let mut p = cx.new_parser_from_tts(tts);
+    if p.token == token::Eof {
+        cx.span_err(sp, format!("{} takes 1 argument", name).as_slice());
+        return None
+    }
     let ret = cx.expander().fold_expr(p.parse_expr());
     if p.token != token::Eof {
         cx.span_err(sp, format!("{} takes 1 argument", name).as_slice());
diff --git a/src/test/compile-fail/extoption_env-not-string-literal.rs b/src/test/compile-fail/extoption_env-not-string-literal.rs
index 10f6c34980e..6371a5c711d 100644
--- a/src/test/compile-fail/extoption_env-not-string-literal.rs
+++ b/src/test/compile-fail/extoption_env-not-string-literal.rs
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn main() { option_env!(10); } //~ ERROR: requires a string
+fn main() { option_env!(10); } //~ ERROR: argument must be a string literal
diff --git a/src/test/compile-fail/non-constant-expr-for-fixed-len-vec.rs b/src/test/compile-fail/non-constant-expr-for-fixed-len-vec.rs
index 2a9a0358cc6..91551941c06 100644
--- a/src/test/compile-fail/non-constant-expr-for-fixed-len-vec.rs
+++ b/src/test/compile-fail/non-constant-expr-for-fixed-len-vec.rs
@@ -13,6 +13,6 @@
 fn main() {
     fn bar(n: int) {
         let _x: [int, ..n];
-        //~^ ERROR expected constant expr for vector length: non-constant path in constant expr
+        //~^ ERROR expected constant expr for array length: non-constant path in constant expr
     }
 }
diff --git a/src/test/run-pass/issue-18464.rs b/src/test/run-pass/issue-18464.rs
index dff86bc1b45..70217868a54 100644
--- a/src/test/run-pass/issue-18464.rs
+++ b/src/test/run-pass/issue-18464.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-pretty
+
 #![deny(dead_code)]
 
 const LOW_RANGE: char = '0';
diff --git a/src/test/run-pass/macro-include-items.rs b/src/test/run-pass/macro-include-items.rs
index 03eec668edd..0e7e6e247f5 100644
--- a/src/test/run-pass/macro-include-items.rs
+++ b/src/test/run-pass/macro-include-items.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-pretty
+
 fn bar() {}
 
 include!(concat!("", "", "../auxiliary/", "macro-include-items-item.rs"))