Rollup merge of #121307 - estebank:drive-by, r=compiler-errors

Drive-by `DUMMY_SP` -> `Span` and fmt changes

Noticed these while doing something else. There's no practical change, but it's preferable to use `DUMMY_SP` as little as possible, particularly when we have perfectlly useful `Span`s available.
This commit is contained in:
Nilstrieb 2024-02-20 07:35:47 +01:00 committed by GitHub
commit ac030bcf05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 32 additions and 18 deletions

View file

@ -62,9 +62,10 @@ fn implied_outlives_bounds<'a, 'tcx>(
};
let mut constraints = QueryRegionConstraints::default();
let span = infcx.tcx.def_span(body_id);
let Ok(InferOk { value: mut bounds, obligations }) = infcx
.instantiate_nll_query_response_and_region_obligations(
&ObligationCause::dummy(),
&ObligationCause::dummy_with_span(span),
param_env,
&canonical_var_values,
canonical_result,
@ -80,8 +81,6 @@ fn implied_outlives_bounds<'a, 'tcx>(
bounds.retain(|bound| !bound.has_placeholders());
if !constraints.is_empty() {
let span = infcx.tcx.def_span(body_id);
debug!(?constraints);
if !constraints.member_constraints.is_empty() {
span_bug!(span, "{:#?}", constraints.member_constraints);