Skip to content

Commit

Permalink
Naming consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
JustusAdam committed Sep 6, 2024
1 parent d108a01 commit b1b1a2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/paralegal-flow/src/ana/graph_converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ mod call_string_resolver {
Either::Right(term) => {
let (def_id, args) = func_of_term(tcx, &term).unwrap();
let instance = Instance::expect_resolve(tcx, param_env, def_id, args);
if let Some(model) = self.marker_context.has_flow_model(def_id) {
if let Some(model) = self.marker_context.has_stub(def_id) {
let TerminatorKind::Call { args, .. } = &term.kind else {
unreachable!()
};
Expand Down
2 changes: 1 addition & 1 deletion crates/paralegal-flow/src/ana/inline_judge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl<'tcx> InlineJudge<'tcx> {
pub fn should_inline(&self, info: &CallInfo<'tcx, '_>) -> InlineJudgement {
let marker_target = info.async_parent.unwrap_or(info.callee);
let marker_target_def_id = marker_target.def_id();
if let Some(model) = self.marker_ctx().has_flow_model(marker_target_def_id) {
if let Some(model) = self.marker_ctx().has_stub(marker_target_def_id) {
// If we're replacing an async function skip the poll call.
//
// I tried to have it replace the poll call only but that didn't seem to work.
Expand Down
4 changes: 2 additions & 2 deletions crates/paralegal-flow/src/ann/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ impl<'tcx> MarkerCtx<'tcx> {
self.tcx().def_path_debug_str(res.def_id())
);

if let Some(model) = self.has_flow_model(res.def_id()) {
if let Some(model) = self.has_stub(res.def_id()) {
let MaybeMonomorphized::Monomorphized(instance) = &mut res else {
self.span_err(
terminator.source_info.span,
Expand Down Expand Up @@ -518,7 +518,7 @@ impl<'tcx> MarkerCtx<'tcx> {
cache.keys().copied().collect::<Vec<_>>()
}

pub fn has_flow_model(&self, def_id: DefId) -> Option<&'static Stub> {
pub fn has_stub(&self, def_id: DefId) -> Option<&'static Stub> {
[def_id]
.into_iter()
.chain(
Expand Down

0 comments on commit b1b1a2b

Please sign in to comment.