Rollup merge of #111633 - nnethercote:avoid-ref-format, r=WaffleLapkin

Avoid `&format("...")` calls in error message code.

Some error message cleanups. Best reviewed one commit at a time.

r? `@davidtwco`
This commit is contained in:
Dylan DPC 2023-05-18 10:52:35 +05:30 committed by GitHub
commit 08efb9d652
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 139 additions and 147 deletions

View file

@ -2260,7 +2260,7 @@ fn confirm_param_env_candidate<'cx, 'tcx>(
obligation, poly_cache_entry, e,
);
debug!("confirm_param_env_candidate: {}", msg);
let err = infcx.tcx.ty_error_with_message(obligation.cause.span, &msg);
let err = infcx.tcx.ty_error_with_message(obligation.cause.span, msg);
Progress { term: err.into(), obligations: vec![] }
}
}