Skip to content

Commit

Permalink
fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hxuhack committed Jan 6, 2025
1 parent 34e0f29 commit edc1503
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rap/src/analysis/safedrop/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ impl<'tcx> SafeDropGraph<'tcx> {

let res = if let TerminatorKind::SwitchInt {
ref discr,
ref targets,
targets: _,
} = &block.switch_stmts[0].kind
{
match discr {
Expand Down
6 changes: 3 additions & 3 deletions rap/src/analysis/safedrop/safedrop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl<'tcx> SafeDropGraph<'tcx> {
};

if !block_node.switch_stmts.is_empty() {
let TerminatorKind::SwitchInt { discr, targets } =
let TerminatorKind::SwitchInt { discr: _, targets } =
block_node.switch_stmts[0].kind.clone()
else {
unreachable!();
Expand Down Expand Up @@ -167,7 +167,7 @@ impl<'tcx> SafeDropGraph<'tcx> {
}
} else {
let TerminatorKind::SwitchInt {
ref discr,
discr: _,
ref targets,
} = real_node.switch_stmts[0].kind
else {
Expand All @@ -192,7 +192,7 @@ impl<'tcx> SafeDropGraph<'tcx> {
}
} else {
let TerminatorKind::SwitchInt {
ref discr,
discr: _,
ref targets,
} = real_node.switch_stmts[0].kind
else {
Expand Down

0 comments on commit edc1503

Please sign in to comment.