Skip to content

Commit

Permalink
Use Local
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Jul 26, 2024
1 parent 8bb15ce commit 7ab6f60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kani-compiler/src/codegen_cprover_gotoc/context/current_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct CurrentFnCtx<'tcx> {
/// A list of pretty names for locals that corrspond to user variables.
local_names: HashMap<Local, InternedString>,
/// Collection of variables that are used in a reference or address-of expression.
address_taken_locals: HashSet<usize>,
address_taken_locals: HashSet<Local>,
/// The symbol name of the current function
name: String,
/// A human readable pretty name for the current function
Expand All @@ -38,7 +38,7 @@ pub struct CurrentFnCtx<'tcx> {

struct AddressTakenLocalsCollector {
/// Locals that appear in `Rvalue::Ref` or `Rvalue::AddressOf` expressions.
address_taken_locals: HashSet<usize>,
address_taken_locals: HashSet<Local>,
}

impl MirVisitor for AddressTakenLocalsCollector {
Expand Down Expand Up @@ -130,7 +130,7 @@ impl<'tcx> CurrentFnCtx<'tcx> {
self.local_names.get(&local).copied()
}

pub fn is_address_taken_local(&self, local: usize) -> bool {
pub fn is_address_taken_local(&self, local: Local) -> bool {
self.address_taken_locals.contains(&local)
}
}
Expand Down

0 comments on commit 7ab6f60

Please sign in to comment.