Make AST lowering a query.

This commit is contained in:
Camille GILLOT
2021-07-13 18:45:20 +02:00
parent 43bb31b954
commit 250c71b85d
14 changed files with 111 additions and 164 deletions

View File

@@ -34,7 +34,7 @@ use tracing::debug;
/// Extract the `LintStore` from the query context.
/// This function exists because we've erased `LintStore` as `dyn Any` in the context.
pub(crate) fn unerased_lint_store(tcx: TyCtxt<'_>) -> &LintStore {
pub fn unerased_lint_store(tcx: TyCtxt<'_>) -> &LintStore {
let store: &dyn Any = &*tcx.lint_store;
store.downcast_ref().unwrap()
}