Skip to content

Commit 90862f6

Browse files
committed
Remove an unnecessary drop.
1 parent be8fd8b commit 90862f6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/rustc_interface/src/callbacks.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ fn track_diagnostic(diagnostic: &mut Diagnostic, f: &mut dyn FnMut(&mut Diagnost
3333
tls::with_context_opt(|icx| {
3434
if let Some(icx) = icx {
3535
if let Some(diagnostics) = icx.diagnostics {
36-
let mut diagnostics = diagnostics.lock();
37-
diagnostics.extend(Some(diagnostic.clone()));
38-
std::mem::drop(diagnostics);
36+
diagnostics.lock().extend(Some(diagnostic.clone()));
3937
}
4038

4139
// Diagnostics are tracked, we can ignore the dependency.

0 commit comments

Comments
 (0)