Skip to content

Commit 29f32b4

Browse files
committed
m1!{...} -> m1!(...)
1 parent 226fd87 commit 29f32b4

File tree

380 files changed

+5330
-2706
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

380 files changed

+5330
-2706
lines changed

src/cargo/cargo.rs

Lines changed: 74 additions & 74 deletions
Large diffs are not rendered by default.

src/compiletest/compiletest.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,20 @@ fn parse_config(args: ~[~str]) -> config {
6363

6464
fn log_config(config: config) {
6565
let c = config;
66-
logv(c, fmt!{"configuration:"});
67-
logv(c, fmt!{"compile_lib_path: %s", config.compile_lib_path});
68-
logv(c, fmt!{"run_lib_path: %s", config.run_lib_path});
69-
logv(c, fmt!{"rustc_path: %s", config.rustc_path});
70-
logv(c, fmt!{"src_base: %s", config.src_base});
71-
logv(c, fmt!{"build_base: %s", config.build_base});
72-
logv(c, fmt!{"stage_id: %s", config.stage_id});
73-
logv(c, fmt!{"mode: %s", mode_str(config.mode)});
74-
logv(c, fmt!{"run_ignored: %b", config.run_ignored});
75-
logv(c, fmt!{"filter: %s", opt_str(config.filter)});
76-
logv(c, fmt!{"runtool: %s", opt_str(config.runtool)});
77-
logv(c, fmt!{"rustcflags: %s", opt_str(config.rustcflags)});
78-
logv(c, fmt!{"verbose: %b", config.verbose});
79-
logv(c, fmt!{"\n"});
66+
logv(c, fmt!("configuration:"));
67+
logv(c, fmt!("compile_lib_path: %s", config.compile_lib_path));
68+
logv(c, fmt!("run_lib_path: %s", config.run_lib_path));
69+
logv(c, fmt!("rustc_path: %s", config.rustc_path));
70+
logv(c, fmt!("src_base: %s", config.src_base));
71+
logv(c, fmt!("build_base: %s", config.build_base));
72+
logv(c, fmt!("stage_id: %s", config.stage_id));
73+
logv(c, fmt!("mode: %s", mode_str(config.mode)));
74+
logv(c, fmt!("run_ignored: %b", config.run_ignored));
75+
logv(c, fmt!("filter: %s", opt_str(config.filter)));
76+
logv(c, fmt!("runtool: %s", opt_str(config.runtool)));
77+
logv(c, fmt!("rustcflags: %s", opt_str(config.rustcflags)));
78+
logv(c, fmt!("verbose: %b", config.verbose));
79+
logv(c, fmt!("\n"));
8080
}
8181

8282
fn opt_str(maybestr: option<~str>) -> ~str {
@@ -129,11 +129,11 @@ fn test_opts(config: config) -> test::test_opts {
129129
}
130130

131131
fn make_tests(config: config) -> ~[test::test_desc] {
132-
debug!{"making tests from %s", config.src_base};
132+
debug!("making tests from %s", config.src_base);
133133
let mut tests = ~[];
134134
for os::list_dir_path(config.src_base).each |file| {
135135
let file = file;
136-
debug!{"inspecting file %s", file};
136+
debug!("inspecting file %s", file);
137137
if is_test(config, file) {
138138
vec::push(tests, make_test(config, file))
139139
}
@@ -175,7 +175,7 @@ fn make_test(config: config, testfile: ~str) ->
175175
}
176176

177177
fn make_test_name(config: config, testfile: ~str) -> ~str {
178-
fmt!{"[%s] %s", mode_str(config.mode), testfile}
178+
fmt!("[%s] %s", mode_str(config.mode), testfile)
179179
}
180180

181181
fn make_test_closure(config: config, testfile: ~str) -> test::test_fn {

src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[expected_error] unsafe {
4545
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
4646
let msg = str::slice(line, idx, len);
4747

48-
debug!{"line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg};
48+
debug!("line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg);
4949

5050
return ~[{line: line_num - adjust_line, kind: kind, msg: msg}];
5151
}

src/compiletest/header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ fn parse_exec_env(line: ~str) -> option<(~str, ~str)> {
109109
match strs.len() {
110110
1u => (strs[0], ~""),
111111
2u => (strs[0], strs[1]),
112-
n => fail fmt!{"Expected 1 or 2 strings, not %u", n}
112+
n => fail fmt!("Expected 1 or 2 strings, not %u", n)
113113
}
114114
}
115115
}
@@ -138,7 +138,7 @@ fn parse_name_value_directive(line: ~str,
138138
option::some(colon) => {
139139
let value = str::slice(line, colon + str::len(keycolon),
140140
str::len(line));
141-
debug!{"%s: %s", directive, value};
141+
debug!("%s: %s", directive, value);
142142
option::some(value)
143143
}
144144
option::none => option::none

src/compiletest/runtest.rs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fn run(config: config, testfile: ~str) {
1616
// We're going to be dumping a lot of info. Start on a new line.
1717
io::stdout().write_str(~"\n\n");
1818
}
19-
debug!{"running %s", testfile};
19+
debug!("running %s", testfile);
2020
let props = load_props(testfile);
2121
match config.mode {
2222
mode_compile_fail => run_cfail_test(config, props, testfile),
@@ -68,8 +68,8 @@ fn check_correct_failure_status(procres: procres) {
6868
const rust_err: int = 101;
6969
if procres.status != rust_err {
7070
fatal_procres(
71-
fmt!{"failure produced the wrong error code: %d",
72-
procres.status},
71+
fmt!("failure produced the wrong error code: %d",
72+
procres.status),
7373
procres);
7474
}
7575
}
@@ -96,11 +96,11 @@ fn run_pretty_test(config: config, props: test_props, testfile: ~str) {
9696

9797
let mut round = 0;
9898
while round < rounds {
99-
logv(config, fmt!{"pretty-printing round %d", round});
99+
logv(config, fmt!("pretty-printing round %d", round));
100100
let procres = print_source(config, testfile, srcs[round]);
101101

102102
if procres.status != 0 {
103-
fatal_procres(fmt!{"pretty-printing failed in round %d", round},
103+
fatal_procres(fmt!("pretty-printing failed in round %d", round),
104104
procres);
105105
}
106106

@@ -151,7 +151,7 @@ fn run_pretty_test(config: config, props: test_props, testfile: ~str) {
151151
if expected != actual {
152152
error(~"pretty-printed source does not match expected source");
153153
let msg =
154-
fmt!{"\n\
154+
fmt!("\n\
155155
expected:\n\
156156
------------------------------------------\n\
157157
%s\n\
@@ -161,7 +161,7 @@ actual:\n\
161161
%s\n\
162162
------------------------------------------\n\
163163
\n",
164-
expected, actual};
164+
expected, actual);
165165
io::stdout().write_str(msg);
166166
fail;
167167
}
@@ -201,10 +201,10 @@ fn check_error_patterns(props: test_props,
201201
let mut done = false;
202202
for str::split_char(procres.stderr, '\n').each |line| {
203203
if str::contains(line, next_err_pat) {
204-
debug!{"found error pattern %s", next_err_pat};
204+
debug!("found error pattern %s", next_err_pat);
205205
next_err_idx += 1u;
206206
if next_err_idx == vec::len(props.error_patterns) {
207-
debug!{"found all error patterns"};
207+
debug!("found all error patterns");
208208
done = true;
209209
break;
210210
}
@@ -217,11 +217,11 @@ fn check_error_patterns(props: test_props,
217217
vec::slice(props.error_patterns, next_err_idx,
218218
vec::len(props.error_patterns));
219219
if vec::len(missing_patterns) == 1u {
220-
fatal_procres(fmt!{"error pattern '%s' not found!",
221-
missing_patterns[0]}, procres);
220+
fatal_procres(fmt!("error pattern '%s' not found!",
221+
missing_patterns[0]), procres);
222222
} else {
223223
for missing_patterns.each |pattern| {
224-
error(fmt!{"error pattern '%s' not found!", pattern});
224+
error(fmt!("error pattern '%s' not found!", pattern));
225225
}
226226
fatal_procres(~"multiple error patterns not found", procres);
227227
}
@@ -240,7 +240,7 @@ fn check_expected_errors(expected_errors: ~[errors::expected_error],
240240
}
241241

242242
let prefixes = vec::map(expected_errors, |ee| {
243-
fmt!{"%s:%u:", testfile, ee.line}
243+
fmt!("%s:%u:", testfile, ee.line)
244244
});
245245

246246
// Scan and extract our error/warning messages,
@@ -253,8 +253,8 @@ fn check_expected_errors(expected_errors: ~[errors::expected_error],
253253
let mut was_expected = false;
254254
for vec::eachi(expected_errors) |i, ee| {
255255
if !found_flags[i] {
256-
debug!{"prefix=%s ee.kind=%s ee.msg=%s line=%s",
257-
prefixes[i], ee.kind, ee.msg, line};
256+
debug!("prefix=%s ee.kind=%s ee.msg=%s line=%s",
257+
prefixes[i], ee.kind, ee.msg, line);
258258
if (str::starts_with(line, prefixes[i]) &&
259259
str::contains(line, ee.kind) &&
260260
str::contains(line, ee.msg)) {
@@ -272,16 +272,16 @@ fn check_expected_errors(expected_errors: ~[errors::expected_error],
272272

273273
if !was_expected && (str::contains(line, ~"error") ||
274274
str::contains(line, ~"warning")) {
275-
fatal_procres(fmt!{"unexpected error pattern '%s'!", line},
275+
fatal_procres(fmt!("unexpected error pattern '%s'!", line),
276276
procres);
277277
}
278278
}
279279

280280
for uint::range(0u, vec::len(found_flags)) |i| {
281281
if !found_flags[i] {
282282
let ee = expected_errors[i];
283-
fatal_procres(fmt!{"expected %s on line %u not found: %s",
284-
ee.kind, ee.line, ee.msg}, procres);
283+
fatal_procres(fmt!("expected %s on line %u not found: %s",
284+
ee.kind, ee.line, ee.msg), procres);
285285
}
286286
}
287287
}
@@ -330,7 +330,7 @@ fn compose_and_run_compiler(
330330
config.compile_lib_path, option::none);
331331
if auxres.status != 0 {
332332
fatal_procres(
333-
fmt!{"auxiliary build of %s failed to compile: ", abs_ab},
333+
fmt!("auxiliary build of %s failed to compile: ", abs_ab),
334334
auxres);
335335
}
336336
}
@@ -342,7 +342,7 @@ fn compose_and_run_compiler(
342342
fn ensure_dir(path: Path) {
343343
if os::path_is_dir(path) { return; }
344344
if !os::make_dir(path, 0x1c0i32) {
345-
fail fmt!{"can't make dir %s", path};
345+
fail fmt!("can't make dir %s", path);
346346
}
347347
}
348348

@@ -414,7 +414,7 @@ fn program_output(config: config, testfile: ~str, lib_path: ~str, prog: ~str,
414414
let cmdline =
415415
{
416416
let cmdline = make_cmdline(lib_path, prog, args);
417-
logv(config, fmt!{"executing %s", cmdline});
417+
logv(config, fmt!("executing %s", cmdline));
418418
cmdline
419419
};
420420
let res = procsrv::run(lib_path, prog, args, env, input);
@@ -430,19 +430,19 @@ fn program_output(config: config, testfile: ~str, lib_path: ~str, prog: ~str,
430430
#[cfg(target_os = "macos")]
431431
#[cfg(target_os = "freebsd")]
432432
fn make_cmdline(_libpath: ~str, prog: ~str, args: ~[~str]) -> ~str {
433-
fmt!{"%s %s", prog, str::connect(args, ~" ")}
433+
fmt!("%s %s", prog, str::connect(args, ~" "))
434434
}
435435
436436
#[cfg(target_os = "win32")]
437437
fn make_cmdline(libpath: ~str, prog: ~str, args: ~[~str]) -> ~str {
438-
fmt!{"%s %s %s", lib_path_cmd_prefix(libpath), prog,
439-
str::connect(args, ~" ")}
438+
fmt!("%s %s %s", lib_path_cmd_prefix(libpath), prog,
439+
str::connect(args, ~" "))
440440
}
441441
442442
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
443443
// for diagnostic purposes
444444
fn lib_path_cmd_prefix(path: ~str) -> ~str {
445-
fmt!{"%s=\"%s\"", util::lib_path_env_var(), util::make_new_path(path)}
445+
fmt!("%s=\"%s\"", util::lib_path_env_var(), util::make_new_path(path))
446446
}
447447

448448
fn dump_output(config: config, testfile: ~str, out: ~str, err: ~str) {
@@ -475,13 +475,13 @@ fn output_testname(testfile: ~str) -> ~str {
475475
fn output_base_name(config: config, testfile: ~str) -> ~str {
476476
let base = config.build_base;
477477
let filename = output_testname(testfile);
478-
fmt!{"%s%s.%s", base, filename, config.stage_id}
478+
fmt!("%s%s.%s", base, filename, config.stage_id)
479479
}
480480
481481
fn maybe_dump_to_stdout(config: config, out: ~str, err: ~str) {
482482
if config.verbose {
483-
let sep1 = fmt!{"------%s------------------------------", ~"stdout"};
484-
let sep2 = fmt!{"------%s------------------------------", ~"stderr"};
483+
let sep1 = fmt!("------%s------------------------------", ~"stdout");
484+
let sep2 = fmt!("------%s------------------------------", ~"stderr");
485485
let sep3 = ~"------------------------------------------";
486486
io::stdout().write_line(sep1);
487487
io::stdout().write_line(out);
@@ -491,13 +491,13 @@ fn maybe_dump_to_stdout(config: config, out: ~str, err: ~str) {
491491
}
492492
}
493493
494-
fn error(err: ~str) { io::stdout().write_line(fmt!{"\nerror: %s", err}); }
494+
fn error(err: ~str) { io::stdout().write_line(fmt!("\nerror: %s", err)); }
495495
496496
fn fatal(err: ~str) -> ! { error(err); fail; }
497497
498498
fn fatal_procres(err: ~str, procres: procres) -> ! {
499499
let msg =
500-
fmt!{"\n\
500+
fmt!("\n\
501501
error: %s\n\
502502
command: %s\n\
503503
stdout:\n\
@@ -509,7 +509,7 @@ stderr:\n\
509509
%s\n\
510510
------------------------------------------\n\
511511
\n",
512-
err, procres.cmdline, procres.stdout, procres.stderr};
512+
err, procres.cmdline, procres.stdout, procres.stderr);
513513
io::stdout().write_str(msg);
514514
fail;
515515
}

src/compiletest/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fn make_new_path(path: ~str) -> ~str {
99
// maintain the current value while adding our own
1010
match getenv(lib_path_env_var()) {
1111
option::some(curr) => {
12-
fmt!{"%s%s%s", path, path_div(), curr}
12+
fmt!("%s%s%s", path, path_div(), curr)
1313
}
1414
option::none => path
1515
}

src/fuzzer/ast_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ fn main() {
2626
assert (!vec_equal(~[5, 5], ~[4, 5], builtin_equal_int));
2727
assert (vec_equal(~[5, 5], ~[5, 5], builtin_equal_int));
2828

29-
error!{"Pass"};
29+
error!("Pass");
3030
}

0 commit comments

Comments
 (0)