Skip to content

Commit 01b9969

Browse files
committed
---
yaml --- r: 37542 b: refs/heads/try c: 4e1ce01 h: refs/heads/master v: v3
1 parent 6df6454 commit 01b9969

File tree

16 files changed

+23
-35
lines changed

16 files changed

+23
-35
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: 2b93ab5a210066abab30e46e54e999fadbcf5e70
5+
refs/heads/try: 4e1ce014c831974738af62dce4fd699c20a001ff
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/librustc/front/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// NB: this file is #include_str'ed into the compiler, re-parsed
1+
// NB: this file is include_str!'ed into the compiler, re-parsed
22
// and injected into each crate the compiler builds. Keep it small.
33

44
mod intrinsic {

branches/try/src/librustc/middle/liveness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@ fn check_expr(expr: @expr, &&self: @Liveness, vt: vt<@Liveness>) {
15361536
// Probably a bad error message (what's an rvalue?)
15371537
// but I can't think of anything better
15381538
self.tcx.sess.span_err(arg_expr.span,
1539-
#fmt("Move mode argument must be an rvalue: try \
1539+
fmt!("Move mode argument must be an rvalue: try \
15401540
(move %s) instead", expr_to_str(*arg_expr,
15411541
self.tcx.sess.intr())));
15421542
}

branches/try/src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,7 @@ fn subst(cx: ctxt,
15331533
cx, typ,
15341534
|r| match r {
15351535
re_bound(br_self) => substs.self_r.expect(
1536-
#fmt("ty::subst: \
1536+
fmt!("ty::subst: \
15371537
Reference to self region when given substs with no \
15381538
self region, ty = %s", ty_to_str(cx, typ))),
15391539
_ => r

branches/try/src/librustc/middle/typeck/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2430,7 +2430,7 @@ fn check_enum_variants(ccx: @crate_ctxt,
24302430
}
24312431
Err(err) => {
24322432
ccx.tcx.sess.span_err(e.span,
2433-
#fmt("expected constant: %s", err));
2433+
fmt!("expected constant: %s", err));
24342434
24352435
}
24362436
}

branches/try/src/libstd/serialization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ pub impl<D: Deserializer, T: Deserializable<D>> Option<T>: Deserializable<D> {
376376
match i {
377377
0 => None,
378378
1 => Some(d.read_enum_variant_arg(0u, || deserialize(d))),
379-
_ => fail(#fmt("Bad variant for option: %u", i))
379+
_ => fail(fmt!("Bad variant for option: %u", i))
380380
}
381381
}
382382
}

branches/try/src/libsyntax/ext/source_util.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn expand_mod(cx: ext_ctxt, sp: span, arg: ast::mac_arg, _body: ast::mac_body)
5757
fn expand_include(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
5858
_body: ast::mac_body) -> @ast::expr {
5959
let args = get_mac_args(cx, sp, arg, 1u, option::Some(1u), ~"include");
60-
let file = expr_to_str(cx, args[0], ~"#include_str requires a string");
60+
let file = expr_to_str(cx, args[0], ~"include_str! requires a string");
6161
let p = parse::new_parser_from_file(cx.parse_sess(), cx.cfg(),
6262
&res_rel_file(cx, sp, &Path(file)),
6363
parse::parser::SOURCE_FILE);
@@ -68,7 +68,7 @@ fn expand_include_str(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,
6868
_body: ast::mac_body) -> @ast::expr {
6969
let args = get_mac_args(cx,sp,arg,1u,option::Some(1u),~"include_str");
7070

71-
let file = expr_to_str(cx, args[0], ~"#include_str requires a string");
71+
let file = expr_to_str(cx, args[0], ~"include_str! requires a string");
7272

7373
let res = io::read_whole_file_str(&res_rel_file(cx, sp, &Path(file)));
7474
match res {
@@ -85,7 +85,7 @@ fn expand_include_bin(cx: ext_ctxt, sp: codemap::span, arg: ast::mac_arg,
8585
_body: ast::mac_body) -> @ast::expr {
8686
let args = get_mac_args(cx,sp,arg,1u,option::Some(1u),~"include_bin");
8787

88-
let file = expr_to_str(cx, args[0], ~"#include_bin requires a string");
88+
let file = expr_to_str(cx, args[0], ~"include_bin! requires a string");
8989

9090
match io::read_whole_file(&res_rel_file(cx, sp, &Path(file))) {
9191
result::Ok(src) => {

branches/try/src/test/bench/core-std.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ use std::map::{Map, HashMap};
88

99
use io::{Reader, ReaderUtil};
1010

11+
macro_rules! bench (
12+
($id:ident) => (maybe_run_test(argv, stringify!($id), $id))
13+
)
14+
1115
fn main() {
1216
let argv = os::args();
13-
#macro[
14-
[#bench[id],
15-
maybe_run_test(argv, #stringify(id), id)
16-
]
17-
];
18-
1917
let tests = vec::view(argv, 1, argv.len());
2018

2119
bench!(shift_push);

branches/try/src/test/bench/msgsend-ring-pipes.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,9 @@ proto! ring (
1818
}
1919
)
2020

21-
fn macros() {
22-
#macro[
23-
[#move_out[x],
24-
unsafe { let y = move *ptr::addr_of(&x); move y }]
25-
];
26-
}
21+
macro_rules! move_out (
22+
($x:expr) => { unsafe { let y = move *ptr::addr_of(&$x); move y } }
23+
)
2724

2825
fn thread_ring(i: uint,
2926
count: uint,

branches/try/src/test/bench/shootout-k-nucleotide-pipes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn main() {
132132
let args = os::args();
133133
let rdr = if os::getenv(~"RUST_BENCH").is_some() {
134134
// FIXME: Using this compile-time env variable is a crummy way to
135-
// get to this massive data set, but #include_bin chokes on it (#2598)
135+
// get to this massive data set, but include_bin! chokes on it (#2598)
136136
let path = Path(env!("CFG_SRC_DIR"))
137137
.push_rel(&Path("src/test/bench/shootout-k-nucleotide.data"));
138138
result::get(&io::file_reader(&path))

branches/try/src/test/bench/shootout-k-nucleotide.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ fn main() {
129129
let args = os::args();
130130
let rdr = if os::getenv(~"RUST_BENCH").is_some() {
131131
// FIXME: Using this compile-time env variable is a crummy way to
132-
// get to this massive data set, but #include_bin chokes on it (#2598)
132+
// get to this massive data set, but include_bin! chokes on it (#2598)
133133
let path = Path(env!("CFG_SRC_DIR"))
134134
.push_rel(&Path("src/test/bench/shootout-k-nucleotide.data"));
135135
result::get(&io::file_reader(&path))
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
struct C {
22
x: int,
33
drop {
4-
#error("dropping: %?", self.x);
4+
error!("dropping: %?", self.x);
55
}
66
}
77

88
fn main() {
99
let c = C{ x: 2};
1010
let d = copy c; //~ ERROR copying a noncopyable value
11-
#error("%?", d.x);
11+
error!("%?", d.x);
1212
}

branches/try/src/test/run-pass/issue-2904.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ mod test {
7171

7272
#[test]
7373
fn read_simple_board() {
74-
let s = #include_str("./maps/contest1.map");
74+
let s = include_str!("./maps/contest1.map");
7575
io::with_str_reader(s, read_board_grid)
7676
}
7777
}

branches/try/src/test/run-pass/macro-2.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
// xfail-pretty - token trees can't pretty print
22

33
fn main() {
4-
#macro[[#mylambda[x, body],
5-
{
6-
fn f(x: int) -> int { return body; }
7-
f
8-
}]];
9-
10-
assert (mylambda!(y, y * 2)(8) == 16);
114

125
macro_rules! mylambda_tt(
136
($x:ident, $body:expr) => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// xfail-test
22
fn main() {
3-
auto s = #shell { uname -a };
3+
let s = shell!( uname -a );
44
log(debug, s);
55
}

branches/try/src/test/run-pass/syntax-extension-source-utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This test is brittle!
2-
// xfail-pretty - the pretty tests lose path information, breaking #include
2+
// xfail-pretty - the pretty tests lose path information, breaking include!
33
#[legacy_exports];
44

55
mod m1 {

0 commit comments

Comments
 (0)