Skip to content

Commit

Permalink
Remove some unnecessary TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Aug 26, 2024
1 parent 4609841 commit 93295ff
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions compiler/rustc_interface/src/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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", || {
Expand Down
5 changes: 0 additions & 5 deletions compiler/rustc_metadata/src/rmeta/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down Expand Up @@ -1379,10 +1378,6 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
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);
}
Expand Down

0 comments on commit 93295ff

Please sign in to comment.