提交 dce0be03 编写于 作者: A Alex Crichton

Test fixes and rebase conflicts

上级 02300dc9
......@@ -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: `{}`",
......
......@@ -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());
......
......@@ -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
......@@ -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
}
}
......@@ -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';
......
......@@ -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"))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册