X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_infer%2Fsrc%2Finfer%2Foutlives%2Fobligations.rs;h=19d03ffa6964a31171dd859ced1854cc869004bc;hb=7907385999b4a83d37ed31d334f3ed9ca02983a1;hp=5d8cc94e05c29b36a520598dd90a0a60671f1559;hpb=6ed1a67b3805bdea306ee055e035e298f92a10e4;p=rust.git diff --git a/compiler/rustc_infer/src/infer/outlives/obligations.rs b/compiler/rustc_infer/src/infer/outlives/obligations.rs index 5d8cc94e05c..19d03ffa696 100644 --- a/compiler/rustc_infer/src/infer/outlives/obligations.rs +++ b/compiler/rustc_infer/src/infer/outlives/obligations.rs @@ -33,9 +33,9 @@ //! Consider: //! //! ``` -//! fn bar(a: T, b: impl for<'a> Fn(&'a T)); +//! fn bar(a: T, b: impl for<'a> Fn(&'a T)) {} //! fn foo(x: T) { -//! bar(x, |y| { ... }) +//! bar(x, |y| { /* ... */}) //! // ^ closure arg //! } //! ``` @@ -153,6 +153,7 @@ pub fn take_registered_region_obligations(&self) -> Vec<(hir::HirId, RegionOblig /// This function may have to perform normalizations, and hence it /// returns an `InferOk` with subobligations that must be /// processed. + #[instrument(level = "debug", skip(self, region_bound_pairs_map))] pub fn process_registered_region_obligations( &self, region_bound_pairs_map: &FxHashMap>, @@ -164,8 +165,6 @@ pub fn process_registered_region_obligations( "cannot process registered region obligations in a snapshot" ); - debug!(?param_env, "process_registered_region_obligations()"); - let my_region_obligations = self.take_registered_region_obligations(); for (body_id, RegionObligation { sup_type, sub_region, origin }) in my_region_obligations { @@ -366,7 +365,7 @@ fn projection_must_outlive( debug!("projection_must_outlive: approx_env_bounds={:?}", approx_env_bounds); // Remove outlives bounds that we get from the environment but - // which are also deducable from the trait. This arises (cc + // which are also deducible from the trait. This arises (cc // #55756) in cases where you have e.g., `>::Item: // 'a` in the environment but `trait Foo<'b> { type Item: 'b // }` in the trait definition.