Remove in_band_lifetimes from rustc_query_impl

See #91867 for more information.
This commit is contained in:
LegionMammal978 2021-12-14 12:13:07 -05:00
parent 404c8471ab
commit 77a0c65264
5 changed files with 7 additions and 8 deletions

View file

@ -151,7 +151,7 @@ fn default_span(&self, tcx: TyCtxt<'_>) -> Span {
}
}
impl Key for (ty::Instance<'tcx>, LocalDefId) {
impl<'tcx> Key for (ty::Instance<'tcx>, LocalDefId) {
#[inline(always)]
fn query_crate_is_local(&self) -> bool {
true

View file

@ -2,7 +2,6 @@
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
#![feature(crate_visibility_modifier)]
#![feature(in_band_lifetimes)]
#![feature(nll)]
#![feature(min_specialization)]
#![feature(once_cell)]

View file

@ -212,7 +212,7 @@ fn new_empty(source_map: &'sess SourceMap) -> Self {
/// Cache promotions require invoking queries, which needs to read the serialized data.
/// In order to serialize the new on-disk cache, the former on-disk cache file needs to be
/// deleted, hence we won't be able to refer to its memmapped data.
fn drop_serialized_data(&self, tcx: TyCtxt<'tcx>) {
fn drop_serialized_data(&self, tcx: TyCtxt<'_>) {
// Load everything into memory so we can write it out to the on-disk
// cache. The vast majority of cacheable query results should already
// be in memory, so this should be a cheap operation.

View file

@ -31,7 +31,7 @@ fn deref(&self) -> &Self::Target {
}
}
impl HasDepContext for QueryCtxt<'tcx> {
impl<'tcx> HasDepContext for QueryCtxt<'tcx> {
type DepKind = rustc_middle::dep_graph::DepKind;
type DepContext = TyCtxt<'tcx>;
@ -41,7 +41,7 @@ fn dep_context(&self) -> &Self::DepContext {
}
}
impl QueryContext for QueryCtxt<'tcx> {
impl QueryContext for QueryCtxt<'_> {
fn current_query_job(&self) -> Option<QueryJobId<Self::DepKind>> {
tls::with_related_context(**self, |icx| icx.query)
}
@ -130,7 +130,7 @@ pub unsafe fn deadlock(self, registry: &rustc_rayon_core::Registry) {
pub(super) fn encode_query_results(
self,
encoder: &mut on_disk_cache::CacheEncoder<'a, 'tcx, opaque::FileEncoder>,
encoder: &mut on_disk_cache::CacheEncoder<'_, 'tcx, opaque::FileEncoder>,
query_result_index: &mut on_disk_cache::EncodedDepNodeIndex,
) -> opaque::FileEncodeResult {
macro_rules! encode_queries {
@ -511,7 +511,7 @@ pub(crate) fn try_collect_active_jobs(
}
}
impl QueryEngine<'tcx> for Queries<'tcx> {
impl<'tcx> QueryEngine<'tcx> for Queries<'tcx> {
fn as_any(&'tcx self) -> &'tcx dyn std::any::Any {
let this = unsafe { std::mem::transmute::<&Queries<'_>, &Queries<'_>>(self) };
this as _

View file

@ -295,7 +295,7 @@ fn alloc_self_profile_query_strings_for_query_cache<'tcx, C>(
/// If we are recording only summary data, the ids will point to
/// just the query names. If we are recording query keys too, we
/// allocate the corresponding strings here.
pub fn alloc_self_profile_query_strings(tcx: TyCtxt<'tcx>) {
pub fn alloc_self_profile_query_strings(tcx: TyCtxt<'_>) {
if !tcx.prof.enabled() {
return;
}