Remove some unnecessary TODOs

This commit is contained in:
Michael Goulet 2024-08-07 13:24:46 -04:00
parent 4609841c07
commit 93295ff6dc
2 changed files with 0 additions and 7 deletions

View File

@ -796,8 +796,6 @@ fn run_required_analyses(tcx: TyCtxt<'_>) {
// Freeze definitions as we don't add new ones at this point.
// We need to wait until now since we synthesize a by-move body
// This improves performance by allowing lock-free access to them.
// FIXME(async_closures): We could force `coroutine_by_move_body_def_id`
// immediately after typeck, then freeze after that.
tcx.untracked().definitions.freeze();
sess.time("MIR_borrow_checking", || {

View File

@ -1066,7 +1066,6 @@ fn should_encode_mir(
}
// Coroutines require optimized MIR to compute layout.
DefKind::Closure if tcx.is_coroutine(def_id.to_def_id()) => (false, true),
// FIXME: lol
DefKind::SyntheticCoroutineBody => (false, true),
// Full-fledged functions + closures
DefKind::AssocFn | DefKind::Fn | DefKind::Closure => {
@ -1379,10 +1378,6 @@ fn encode_def_ids(&mut self) {
let def_span = tcx.def_span(local_id);
record!(self.tables.def_span[def_id] <- def_span);
}
// FIXME(async_closures): We should just use `tcx.attrs` rather than going
// through the HIR. Historically, though, this has been inefficient apparently.
// For now, it's kind of pointless to fix, because coroutine-closures' coroutine
// bodies have no attrs anyways.
if should_encode_attrs(def_kind) {
self.encode_attrs(local_id);
}