Skip to content

Commit

Permalink
set_span -> span rename
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Jan 6, 2024
1 parent 4b02fec commit aa7def4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/preempt_count/adjustment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl<'tcx> AnalysisCtxt<'tcx> {
match &site.kind {
UseSiteKind::Call(span) => {
if diag.span.is_dummy() {
diag.set_span(*span);
diag.span(*span);
} else {
diag.span_note(*span, "which is called from here");
limit -= 1;
Expand All @@ -69,23 +69,23 @@ impl<'tcx> AnalysisCtxt<'tcx> {
let mut multispan = MultiSpan::from_span(*drop_span);
multispan.push_span_label(*place_span, "value being dropped is here");
if diag.span.is_dummy() {
diag.set_span(multispan);
diag.span(multispan);
} else {
diag.span_note(multispan, "which is dropped here");
limit -= 1;
}
}
UseSiteKind::PointerCoercion(span) => {
if diag.span.is_dummy() {
diag.set_span(*span);
diag.span(*span);
} else {
diag.span_note(*span, "which is used as a pointer here");
limit -= 1;
}
}
UseSiteKind::Vtable(span) => {
if diag.span.is_dummy() {
diag.set_span(*span);
diag.span(*span);
} else {
diag.span_note(*span, "which is used as a vtable here");
limit -= 1;
Expand Down Expand Up @@ -746,7 +746,7 @@ memoize!(
"reporting preemption count for instance `{}`",
PolyDisplay(&poly_instance)
));
diag.set_span(cx.def_span(instance.def_id()));
diag.span(cx.def_span(instance.def_id()));
if let Ok(property) = result {
diag.note(format!("adjustment is inferred to be {}", property));
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/preempt_count/expectation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ memoize!(
"reporting preemption count for instance `{}`",
PolyDisplay(&poly_instance)
));
diag.set_span(cx.def_span(instance.def_id()));
diag.span(cx.def_span(instance.def_id()));
if let Ok(property) = result {
diag.note(format!("expectation is inferred to be {}", property));
} else {
Expand Down

0 comments on commit aa7def4

Please sign in to comment.