Add debug assertions to implements_trait
Improve debug assertions for `make_projection`
This commit is contained in:
parent
29730969b1
commit
71cc39e1f2
6 changed files with 117 additions and 93 deletions
|
|
@ -109,7 +109,7 @@ fn is_ref_iterable<'tcx>(
|
|||
&& let sig = cx.tcx.liberate_late_bound_regions(fn_id, cx.tcx.fn_sig(fn_id).skip_binder())
|
||||
&& let &[req_self_ty, req_res_ty] = &**sig.inputs_and_output
|
||||
&& let param_env = cx.tcx.param_env(fn_id)
|
||||
&& implements_trait_with_env(cx.tcx, param_env, req_self_ty, trait_id, [])
|
||||
&& implements_trait_with_env(cx.tcx, param_env, req_self_ty, trait_id, &[])
|
||||
&& let Some(into_iter_ty) =
|
||||
make_normalized_projection_with_regions(cx.tcx, param_env, trait_id, sym!(IntoIter), [req_self_ty])
|
||||
&& let req_res_ty = normalize_with_regions(cx.tcx, param_env, req_res_ty)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue