Final bits
This commit is contained in:
parent
f1767dbb42
commit
e09242d5b8
12 changed files with 124 additions and 34 deletions
|
@ -23,7 +23,7 @@ impl<F, G> CustomTypeOp<F, G> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'tcx, F, R, G> super::TypeOp<'tcx> for CustomTypeOp<F, G>
|
||||
impl<'tcx, F, R: fmt::Debug, G> super::TypeOp<'tcx> for CustomTypeOp<F, G>
|
||||
where
|
||||
F: for<'a, 'cx> FnOnce(&'a InferCtxt<'cx, 'tcx>) -> Fallible<InferOk<'tcx, R>>,
|
||||
G: Fn() -> String,
|
||||
|
@ -89,8 +89,8 @@ pub fn scrape_region_constraints<'tcx, Op: super::TypeOp<'tcx, Output = R>, R>(
|
|||
infcx.tcx,
|
||||
region_obligations
|
||||
.iter()
|
||||
.map(|r_o| (r_o.sup_type, r_o.sub_region))
|
||||
.map(|(ty, r)| (infcx.resolve_vars_if_possible(ty), r)),
|
||||
.map(|r_o| (r_o.sup_type, r_o.sub_region, r_o.origin.to_constraint_category()))
|
||||
.map(|(ty, r, cc)| (infcx.resolve_vars_if_possible(ty), r, cc)),
|
||||
®ion_constraint_data,
|
||||
);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ pub use rustc_middle::traits::query::type_op::*;
|
|||
/// extract out the resulting region constraints (or an error if it
|
||||
/// cannot be completed).
|
||||
pub trait TypeOp<'tcx>: Sized + fmt::Debug {
|
||||
type Output;
|
||||
type Output: fmt::Debug;
|
||||
type ErrorInfo;
|
||||
|
||||
/// Processes the operation and all resulting obligations,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue