diff options
| author | bors <bors@rust-lang.org> | 2022-09-16 16:46:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-16 16:46:14 +0000 |
| commit | 4d4e51e428ba7b1ece3c67d1c114e2b486dc85dd (patch) | |
| tree | ba9e276a337aeac2af09c2212709314f5e534c26 /compiler/rustc_trait_selection/src/traits | |
| parent | 54f20bbb8a7aeab93da17c0019c1aaa10329245a (diff) | |
| parent | d97fdf16d96a1bf36d024074877a132802fd5843 (diff) | |
| download | rust-4d4e51e428ba7b1ece3c67d1c114e2b486dc85dd.tar.gz rust-4d4e51e428ba7b1ece3c67d1c114e2b486dc85dd.zip | |
Auto merge of #101902 - jackh726:revert-static-hrtb-error, r=nikomatsakis
Partially revert #101433 reverts #101433 to fix #101844 We should get this into the beta cut, since the ICE is getting hit quite a bit.
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
4 files changed, 6 insertions, 8 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index 13d9c160038..973cddbd179 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -2256,8 +2256,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { | ObligationCauseCode::QuestionMark | ObligationCauseCode::CheckAssociatedTypeBounds { .. } | ObligationCauseCode::LetElse - | ObligationCauseCode::BinOp { .. } - | ObligationCauseCode::AscribeUserTypeProvePredicate(..) => {} + | ObligationCauseCode::BinOp { .. } => {} ObligationCauseCode::SliceOrArrayElem => { err.note("slice and array elements must have `Sized` type"); } diff --git a/compiler/rustc_trait_selection/src/traits/query/normalize.rs b/compiler/rustc_trait_selection/src/traits/query/normalize.rs index a3f8f4e2ed0..f65fc5bad0d 100644 --- a/compiler/rustc_trait_selection/src/traits/query/normalize.rs +++ b/compiler/rustc_trait_selection/src/traits/query/normalize.rs @@ -48,11 +48,10 @@ impl<'cx, 'tcx> AtExt<'tcx> for At<'cx, 'tcx> { T: TypeFoldable<'tcx>, { debug!( - "normalize::<{}>(value={:?}, param_env={:?}, cause={:?})", + "normalize::<{}>(value={:?}, param_env={:?})", std::any::type_name::<T>(), value, self.param_env, - self.cause, ); if !needs_normalization(&value, self.param_env.reveal()) { return Ok(Normalized { value, obligations: vec![] }); diff --git a/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs b/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs index 18988861add..f6e196e3141 100644 --- a/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs +++ b/compiler/rustc_trait_selection/src/traits/query/type_op/custom.rs @@ -23,7 +23,7 @@ impl<F, G> CustomTypeOp<F, G> { } } -impl<'tcx, F, R: fmt::Debug, G> super::TypeOp<'tcx> for CustomTypeOp<F, G> +impl<'tcx, F, R, 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, r_o.origin.to_constraint_category())) - .map(|(ty, r, cc)| (infcx.resolve_vars_if_possible(ty), r, cc)), + .map(|r_o| (r_o.sup_type, r_o.sub_region)) + .map(|(ty, r)| (infcx.resolve_vars_if_possible(ty), r)), ®ion_constraint_data, ); diff --git a/compiler/rustc_trait_selection/src/traits/query/type_op/mod.rs b/compiler/rustc_trait_selection/src/traits/query/type_op/mod.rs index 8a79165702c..578e1d00cf9 100644 --- a/compiler/rustc_trait_selection/src/traits/query/type_op/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/query/type_op/mod.rs @@ -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: fmt::Debug; + type Output; type ErrorInfo; /// Processes the operation and all resulting obligations, |
