Skip to content

Commit 2015080

Browse files
committed
Auto merge of #12160 - epage:nightly, r=weihanglo
fix: Pass CI on nightly It appears rustc is now giving warnings when calling `drop` on `Copy` types (`drop-copy`)
2 parents 46b83f4 + 7c7abfe commit 2015080

File tree

1 file changed

+11
-7
lines changed
  • src/cargo/core/compiler/job_queue

1 file changed

+11
-7
lines changed

src/cargo/core/compiler/job_queue/mod.rs

+11-7
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ impl<'cfg> DrainState<'cfg> {
812812
);
813813
if !cx.bcx.build_config.build_plan {
814814
// It doesn't really matter if this fails.
815-
drop(cx.bcx.config.shell().status("Finished", message));
815+
let _ = cx.bcx.config.shell().status("Finished", message);
816816
future_incompat::save_and_display_report(
817817
cx.bcx,
818818
&self.per_package_future_incompat_reports,
@@ -836,7 +836,7 @@ impl<'cfg> DrainState<'cfg> {
836836
if new_err.print_always || err_state.count == 0 {
837837
crate::display_error(&new_err.error, shell);
838838
if err_state.count == 0 && !self.active.is_empty() {
839-
drop(shell.warn("build failed, waiting for other jobs to finish..."));
839+
let _ = shell.warn("build failed, waiting for other jobs to finish...");
840840
}
841841
err_state.count += 1;
842842
} else {
@@ -863,11 +863,11 @@ impl<'cfg> DrainState<'cfg> {
863863
.values()
864864
.map(|u| self.name_for_progress(u))
865865
.collect::<Vec<_>>();
866-
drop(self.progress.tick_now(
866+
let _ = self.progress.tick_now(
867867
self.finished,
868868
self.total_units,
869869
&format!(": {}", active_names.join(", ")),
870-
));
870+
);
871871
}
872872

873873
fn name_for_progress(&self, unit: &Unit) -> String {
@@ -1005,12 +1005,16 @@ impl<'cfg> DrainState<'cfg> {
10051005
message.push_str(" generated ");
10061006
match count.total {
10071007
1 => message.push_str("1 warning"),
1008-
n => drop(write!(message, "{} warnings", n)),
1008+
n => {
1009+
let _ = write!(message, "{} warnings", n);
1010+
}
10091011
};
10101012
match count.duplicates {
10111013
0 => {}
10121014
1 => message.push_str(" (1 duplicate)"),
1013-
n => drop(write!(message, " ({} duplicates)", n)),
1015+
n => {
1016+
let _ = write!(message, " ({} duplicates)", n);
1017+
}
10141018
}
10151019
// Only show the `cargo fix` message if its a local `Unit`
10161020
if unit.is_local() {
@@ -1054,7 +1058,7 @@ impl<'cfg> DrainState<'cfg> {
10541058
}
10551059
// Errors are ignored here because it is tricky to handle them
10561060
// correctly, and they aren't important.
1057-
drop(config.shell().warn(message));
1061+
let _ = config.shell().warn(message);
10581062
}
10591063

10601064
fn finish(

0 commit comments

Comments
 (0)