]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/check/fn_ctxt/mod.rs
Address review comments
[rust.git] / compiler / rustc_typeck / src / check / fn_ctxt / mod.rs
index bfc7c4ac2889af62609a5cf993f09f95eec70c47..e008d50aa514a44b3eaf892010bb8ea3c6dc0372 100644 (file)
 use std::cell::{Cell, RefCell};
 use std::ops::Deref;
 
-/// The `FnCtxt` stores type-checking context needed to type-check function bodies,
-/// in contrast to [`ItemCtxt`], which is used to type-check item *signatures*.
+/// The `FnCtxt` stores type-checking context needed to type-check bodies of
+/// functions, closures, and `const`s, including performing type inference
+/// with [`InferCtxt`].
+///
+/// This is in contrast to [`ItemCtxt`], which is used to type-check item *signatures*
+/// and thus does not perform type inference.
+///
+/// See [`ItemCtxt`]'s docs for more.
+///
+/// [`ItemCtxt`]: crate::collect::ItemCtxt
+/// [`InferCtxt`]: infer::InferCtxt
 pub struct FnCtxt<'a, 'tcx> {
     pub(super) body_id: hir::HirId,