Opt-in diagnostics reporting to avoid doing extra work in the new solver
This commit is contained in:
@@ -50,7 +50,8 @@ pub fn codegen_select_candidate<'tcx>(
|
||||
// Currently, we use a fulfillment context to completely resolve
|
||||
// all nested obligations. This is because they can inform the
|
||||
// inference of the impl's type parameters.
|
||||
let ocx = ObligationCtxt::new(&infcx);
|
||||
// FIXME(-Znext-solver): Doesn't need diagnostics if new solver.
|
||||
let ocx = ObligationCtxt::new_with_diagnostics(&infcx);
|
||||
let impl_source = selection.map(|obligation| {
|
||||
ocx.register_obligation(obligation);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user