Skip to content

Commit 13e5875

Browse files
committed
add some docs to hooks/mod.rs
1 parent bb6c66b commit 13e5875

File tree

1 file changed

+5
-0
lines changed
  • compiler/rustc_middle/src/hooks

1 file changed

+5
-0
lines changed

compiler/rustc_middle/src/hooks/mod.rs

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

0 commit comments

Comments
 (0)