Auto merge of #122392 - BoxyUwU:misc_cleanup, r=lcnr
misc cleanups from debugging something
rename `instantiate_canonical_with_fresh_inference_vars` to `instantiate_canonical` the substs for the canonical are not solely infer vars as that would be wildly wrong and it is rather confusing to see this method called and think that the entire canonicalization setup is completely broken when it is not 👍
also update region debug printing to be more like the custom impls for Ty/Const, right now regions in debug output are horribly verbose and make it incredibly hard to read but with this atleast boundvars and placeholders when debugging the new solver do not take up excessive amounts of space.
r? `@lcnr`
This commit is contained in:
@@ -38,8 +38,8 @@ mod instantiate;
|
||||
pub mod query_response;
|
||||
|
||||
impl<'tcx> InferCtxt<'tcx> {
|
||||
/// Creates an instantiation S for the canonical value with fresh
|
||||
/// inference variables and applies it to the canonical value.
|
||||
/// Creates an instantiation S for the canonical value with fresh inference
|
||||
/// variables and placeholders then applies it to the canonical value.
|
||||
/// Returns both the instantiated result *and* the instantiation S.
|
||||
///
|
||||
/// This can be invoked as part of constructing an
|
||||
@@ -50,7 +50,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
||||
/// At the end of processing, the instantiation S (once
|
||||
/// canonicalized) then represents the values that you computed
|
||||
/// for each of the canonical inputs to your query.
|
||||
pub fn instantiate_canonical_with_fresh_inference_vars<T>(
|
||||
pub fn instantiate_canonical<T>(
|
||||
&self,
|
||||
span: Span,
|
||||
canonical: &Canonical<'tcx, T>,
|
||||
|
||||
@@ -678,7 +678,7 @@ impl<'tcx> InferCtxtBuilder<'tcx> {
|
||||
T: TypeFoldable<TyCtxt<'tcx>>,
|
||||
{
|
||||
let infcx = self.build();
|
||||
let (value, args) = infcx.instantiate_canonical_with_fresh_inference_vars(span, canonical);
|
||||
let (value, args) = infcx.instantiate_canonical(span, canonical);
|
||||
(infcx, value, args)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user