Skip to content

Commit f326f0f

Browse files
committed
libtest: remove redundant argument to writeln!() (clippy::writeln_empty_string)
1 parent 77af19e commit f326f0f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/librustc_mir/util/liveness.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ fn dump_matched_mir_node<'tcx>(
293293
writeln!(file, "// MIR local liveness analysis for `{}`", node_path)?;
294294
writeln!(file, "// source = {:?}", source)?;
295295
writeln!(file, "// pass_name = {}", pass_name)?;
296-
writeln!(file, "")?;
296+
writeln!(file)?;
297297
write_mir_fn(tcx, source, body, &mut file, result)?;
298298
Ok(())
299299
});
@@ -316,7 +316,7 @@ pub fn write_mir_fn<'tcx>(
316316
write_basic_block(tcx, block, body, &mut |_, _| Ok(()), w)?;
317317
print(w, " ", &result.outs)?;
318318
if block.index() + 1 != body.basic_blocks().len() {
319-
writeln!(w, "")?;
319+
writeln!(w)?;
320320
}
321321
}
322322

src/librustc_mir/util/pretty.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fn dump_matched_mir_node<'tcx, F>(
134134
if let Some(ref layout) = body.generator_layout {
135135
writeln!(file, "// generator_layout = {:?}", layout)?;
136136
}
137-
writeln!(file, "")?;
137+
writeln!(file)?;
138138
extra_data(PassWhere::BeforeCFG, &mut file)?;
139139
write_user_type_annotations(body, &mut file)?;
140140
write_mir_fn(tcx, source, body, &mut extra_data, &mut file)?;
@@ -242,13 +242,13 @@ pub fn write_mir_pretty<'tcx>(
242242
first = false;
243243
} else {
244244
// Put empty lines between all items
245-
writeln!(w, "")?;
245+
writeln!(w)?;
246246
}
247247

248248
write_mir_fn(tcx, MirSource::item(def_id), body, &mut |_, _| Ok(()), w)?;
249249

250250
for (i, body) in tcx.promoted_mir(def_id).iter_enumerated() {
251-
writeln!(w, "")?;
251+
writeln!(w)?;
252252
let src = MirSource { instance: ty::InstanceDef::Item(def_id), promoted: Some(i) };
253253
write_mir_fn(tcx, src, body, &mut |_, _| Ok(()), w)?;
254254
}
@@ -271,7 +271,7 @@ where
271271
extra_data(PassWhere::BeforeBlock(block), w)?;
272272
write_basic_block(tcx, block, body, extra_data, w)?;
273273
if block.index() + 1 != body.basic_blocks().len() {
274-
writeln!(w, "")?;
274+
writeln!(w)?;
275275
}
276276
}
277277

@@ -529,7 +529,7 @@ pub fn write_mir_intro<'tcx>(
529529
write_scope_tree(tcx, body, &scope_tree, w, OUTERMOST_SOURCE_SCOPE, 1)?;
530530

531531
// Add an empty line before the first block is printed.
532-
writeln!(w, "")?;
532+
writeln!(w)?;
533533

534534
Ok(())
535535
}

src/libtest/console.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ pub fn list_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn>) -> io::Res
169169

170170
if !quiet {
171171
if ntest != 0 || nbench != 0 {
172-
writeln!(output, "")?;
172+
writeln!(output)?;
173173
}
174174

175175
writeln!(output, "{}, {}", plural(ntest, "test"), plural(nbench, "benchmark"))?;

0 commit comments

Comments
 (0)