Simplify tls::enter_context
.
This commit is contained in:
parent
ef934d9b63
commit
f7b3e39502
5 changed files with 6 additions and 6 deletions
|
@ -38,7 +38,7 @@ fn track_diagnostic(diagnostic: &mut Diagnostic, f: &mut dyn FnMut(&mut Diagnost
|
|||
|
||||
// Diagnostics are tracked, we can ignore the dependency.
|
||||
let icx = tls::ImplicitCtxt { task_deps: TaskDepsRef::Ignore, ..icx.clone() };
|
||||
return tls::enter_context(&icx, move |_| (*f)(diagnostic));
|
||||
return tls::enter_context(&icx, move || (*f)(diagnostic));
|
||||
}
|
||||
|
||||
// In any other case, invoke diagnostics anyway.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue