]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_infer/src/infer/outlives/obligations.rs
fix most compiler/ doctests
[rust.git] / compiler / rustc_infer / src / infer / outlives / obligations.rs
index 5d8cc94e05c29b36a520598dd90a0a60671f1559..19d03ffa6964a31171dd859ced1854cc869004bc 100644 (file)
@@ -33,9 +33,9 @@
 //! Consider:
 //!
 //! ```
-//! fn bar<T>(a: T, b: impl for<'a> Fn(&'a T));
+//! fn bar<T>(a: T, b: impl for<'a> Fn(&'a T)) {}
 //! fn foo<T>(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<hir::HirId, RegionBoundPairs<'tcx>>,
@@ -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., `<T as Foo<'a>>::Item:
         // 'a` in the environment but `trait Foo<'b> { type Item: 'b
         // }` in the trait definition.