Skip to content

Commit 42aed6b

Browse files
committed
std: Remove format_strbuf!()
This was only ever a transitionary macro.
1 parent 24b1ce1 commit 42aed6b

File tree

104 files changed

+754
-931
lines changed

Some content is hidden

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

104 files changed

+754
-931
lines changed

src/compiletest/compiletest.rs

+34-36
Original file line numberDiff line numberDiff line change
@@ -188,41 +188,41 @@ pub fn parse_config(args: Vec<String> ) -> Config {
188188

189189
pub fn log_config(config: &Config) {
190190
let c = config;
191-
logv(c, format_strbuf!("configuration:"));
192-
logv(c, format_strbuf!("compile_lib_path: {}", config.compile_lib_path));
193-
logv(c, format_strbuf!("run_lib_path: {}", config.run_lib_path));
194-
logv(c, format_strbuf!("rustc_path: {}", config.rustc_path.display()));
195-
logv(c, format_strbuf!("src_base: {}", config.src_base.display()));
196-
logv(c, format_strbuf!("build_base: {}", config.build_base.display()));
197-
logv(c, format_strbuf!("stage_id: {}", config.stage_id));
198-
logv(c, format_strbuf!("mode: {}", config.mode));
199-
logv(c, format_strbuf!("run_ignored: {}", config.run_ignored));
200-
logv(c, format_strbuf!("filter: {}",
201-
opt_str(&config.filter
202-
.as_ref()
203-
.map(|re| {
204-
re.to_str().into_string()
205-
}))));
206-
logv(c, format_strbuf!("runtool: {}", opt_str(&config.runtool)));
207-
logv(c, format_strbuf!("host-rustcflags: {}",
208-
opt_str(&config.host_rustcflags)));
209-
logv(c, format_strbuf!("target-rustcflags: {}",
210-
opt_str(&config.target_rustcflags)));
211-
logv(c, format_strbuf!("jit: {}", config.jit));
212-
logv(c, format_strbuf!("target: {}", config.target));
213-
logv(c, format_strbuf!("host: {}", config.host));
214-
logv(c, format_strbuf!("android-cross-path: {}",
215-
config.android_cross_path.display()));
216-
logv(c, format_strbuf!("adb_path: {}", config.adb_path));
217-
logv(c, format_strbuf!("adb_test_dir: {}", config.adb_test_dir));
218-
logv(c, format_strbuf!("adb_device_status: {}",
219-
config.adb_device_status));
191+
logv(c, format!("configuration:"));
192+
logv(c, format!("compile_lib_path: {}", config.compile_lib_path));
193+
logv(c, format!("run_lib_path: {}", config.run_lib_path));
194+
logv(c, format!("rustc_path: {}", config.rustc_path.display()));
195+
logv(c, format!("src_base: {}", config.src_base.display()));
196+
logv(c, format!("build_base: {}", config.build_base.display()));
197+
logv(c, format!("stage_id: {}", config.stage_id));
198+
logv(c, format!("mode: {}", config.mode));
199+
logv(c, format!("run_ignored: {}", config.run_ignored));
200+
logv(c, format!("filter: {}",
201+
opt_str(&config.filter
202+
.as_ref()
203+
.map(|re| {
204+
re.to_str().into_string()
205+
}))));
206+
logv(c, format!("runtool: {}", opt_str(&config.runtool)));
207+
logv(c, format!("host-rustcflags: {}",
208+
opt_str(&config.host_rustcflags)));
209+
logv(c, format!("target-rustcflags: {}",
210+
opt_str(&config.target_rustcflags)));
211+
logv(c, format!("jit: {}", config.jit));
212+
logv(c, format!("target: {}", config.target));
213+
logv(c, format!("host: {}", config.host));
214+
logv(c, format!("android-cross-path: {}",
215+
config.android_cross_path.display()));
216+
logv(c, format!("adb_path: {}", config.adb_path));
217+
logv(c, format!("adb_test_dir: {}", config.adb_test_dir));
218+
logv(c, format!("adb_device_status: {}",
219+
config.adb_device_status));
220220
match config.test_shard {
221221
None => logv(c, "test_shard: (all)".to_string()),
222-
Some((a,b)) => logv(c, format_strbuf!("test_shard: {}.{}", a, b))
222+
Some((a,b)) => logv(c, format!("test_shard: {}.{}", a, b))
223223
}
224-
logv(c, format_strbuf!("verbose: {}", config.verbose));
225-
logv(c, format_strbuf!("\n"));
224+
logv(c, format!("verbose: {}", config.verbose));
225+
logv(c, format!("\n"));
226226
}
227227

228228
pub fn opt_str<'a>(maybestr: &'a Option<String>) -> &'a str {
@@ -356,12 +356,10 @@ pub fn make_test_name(config: &Config, testfile: &Path) -> test::TestName {
356356
let filename = path.filename_str();
357357
let p = path.dir_path();
358358
let dir = p.filename_str();
359-
format_strbuf!("{}/{}", dir.unwrap_or(""), filename.unwrap_or(""))
359+
format!("{}/{}", dir.unwrap_or(""), filename.unwrap_or(""))
360360
}
361361

362-
test::DynTestName(format_strbuf!("[{}] {}",
363-
config.mode,
364-
shorten(testfile)))
362+
test::DynTestName(format!("[{}] {}", config.mode, shorten(testfile)))
365363
}
366364

367365
pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {

src/compiletest/header.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ pub fn load_props(testfile: &Path) -> TestProps {
120120

121121
pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
122122
fn ignore_target(config: &Config) -> String {
123-
format_strbuf!("ignore-{}", util::get_os(config.target.as_slice()))
123+
format!("ignore-{}", util::get_os(config.target.as_slice()))
124124
}
125125
fn ignore_stage(config: &Config) -> String {
126-
format_strbuf!("ignore-{}",
127-
config.stage_id.as_slice().split('-').next().unwrap())
126+
format!("ignore-{}",
127+
config.stage_id.as_slice().split('-').next().unwrap())
128128
}
129129

130130
let val = iter_header(testfile, |ln| {
@@ -243,7 +243,7 @@ fn parse_name_directive(line: &str, directive: &str) -> bool {
243243

244244
pub fn parse_name_value_directive(line: &str, directive: String)
245245
-> Option<String> {
246-
let keycolon = format_strbuf!("{}:", directive);
246+
let keycolon = format!("{}:", directive);
247247
match line.find_str(keycolon.as_slice()) {
248248
Some(colon) => {
249249
let value = line.slice(colon + keycolon.len(),

0 commit comments

Comments
 (0)