We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ad084c commit bac98aaCopy full SHA for bac98aa
src/cargo/ops/cargo_compile/unit_generator.rs
@@ -287,8 +287,9 @@ impl<'a> UnitGenerator<'a, '_> {
287
}
288
CargoResult::Ok(())
289
};
290
+
291
+ let mut msg = String::new();
292
if !suggestion.is_empty() {
- let mut msg = String::new();
293
write!(
294
msg,
295
"no {} target {} `{}`{}",
@@ -298,9 +299,7 @@ impl<'a> UnitGenerator<'a, '_> {
298
299
suggestion,
300
)?;
301
append_targets_elsewhere(&mut msg, "\n")?;
- anyhow::bail!(msg);
302
} else {
303
304
writeln!(
305
306
"no {} target {} `{}`.",
@@ -316,8 +315,8 @@ impl<'a> UnitGenerator<'a, '_> {
316
315
writeln!(msg, " {}", target.name())?;
317
318
319
320
+ anyhow::bail!(msg);
321
322
Ok(proposals)
323
0 commit comments