Skip to content

Commit

Permalink
Remove unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Jan 15, 2025
1 parent 1dc56bd commit d0358eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tasks/coverage/src/driver.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{hint::unreachable_unchecked, ops::ControlFlow, path::PathBuf};
use std::{ops::ControlFlow, path::PathBuf};

use rustc_hash::FxHashSet;

Expand Down Expand Up @@ -86,8 +86,7 @@ impl CompilerInterface for Driver {
return ControlFlow::Break(());
};
let AstKind::Program(program) = root_node.kind() else {
// SAFETY: root_node is guaranteed to be Program
unsafe { unreachable_unchecked() };
return ControlFlow::Break(());
};
if let Some(errors) = check_semantic_ids(program) {
self.errors.extend(errors);
Expand Down

0 comments on commit d0358eb

Please sign in to comment.