Skip to content

Commit

Permalink
analyze: fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
spernsteiner committed Apr 11, 2024
1 parent e4f7145 commit e0cdb2e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions c2rust-analyze/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -939,21 +939,16 @@ impl<'tcx> GlobalAnalysisCtxt<'tcx> {
.flat_map(|(fn_sig, known_fn)| known_fn.ptr_perms(fn_sig))
}

/// Check whether the function with the given `def_id` has been marked as non-rewritable.
pub fn dont_rewrite_fn(&self, def_id: DefId) -> bool {
self.dont_rewrite_fns.contains(def_id)
}
/// Check whether analysis failed for the function with the given `def_id`.
pub fn fn_analysis_invalid(&self, def_id: DefId) -> bool {
self.dont_rewrite_fns
.get(def_id)
.intersects(DontRewriteFnReason::ANALYSIS_INVALID_MASK)
}

pub fn dont_rewrite_static(&self, def_id: DefId) -> bool {
self.dont_rewrite_statics.contains(def_id)
}
pub fn dont_rewrite_field(&self, def_id: DefId) -> bool {
self.dont_rewrite_fields.contains(def_id)
}
}

impl<'a, 'tcx> AnalysisCtxt<'a, 'tcx> {
Expand Down

0 comments on commit e0cdb2e

Please sign in to comment.