Access upvars through a query.

This commit is contained in:
Camille GILLOT 2022-10-25 17:59:18 +00:00
parent d35dbbdc8e
commit 7dcc74eee5
9 changed files with 111 additions and 111 deletions

View file

@ -475,14 +475,10 @@ rustc_queries! {
}
}
query symbols_for_closure_captures(
key: (LocalDefId, LocalDefId)
) -> &'tcx Vec<rustc_span::Symbol> {
arena_cache
query closure_captures(key: LocalDefId) -> &'tcx [&'tcx ty::CapturedPlace<'tcx>] {
desc {
|tcx| "finding symbols for captures of closure `{}` in `{}`",
tcx.def_path_str(key.1.to_def_id()),
tcx.def_path_str(key.0.to_def_id())
|tcx| "finding symbols for captures of closure `{}`",
tcx.def_path_str(key.to_def_id())
}
}