Rollup merge of #116297 - RalfJung:hooks, r=oli-obk

add some docs to hooks/mod.rs

r? `@oli-obk`
This commit is contained in:
Matthias Krüger 2023-10-06 21:17:48 +02:00 committed by GitHub
commit fdb136a83f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,8 @@
//! "Hooks" provide a way for `tcx` functionality to be provided by some downstream crate without
//! everything in rustc having to depend on that crate. This is somewhat similar to queries, but
//! queries come with a lot of machinery for caching and incremental compilation, whereas hooks are
//! just plain function pointers without any of the query magic.
use crate::mir;
use crate::query::TyCtxtAt;
use crate::ty::{Ty, TyCtxt};