1
Fork 0

Rollup merge of #130294 - nnethercote:more-lifetimes, r=lcnr

Lifetime cleanups

The last commit is very opinionated, let's see how we go.

r? `@oli-obk`
This commit is contained in:
León Orell Valerian Liehr 2024-09-14 18:12:13 +02:00 committed by GitHub
commit 03e8b6bbfa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
49 changed files with 224 additions and 231 deletions

View file

@ -155,11 +155,11 @@ pub trait DropElaborator<'a, 'tcx>: fmt::Debug {
}
#[derive(Debug)]
struct DropCtxt<'l, 'b, 'tcx, D>
struct DropCtxt<'a, 'b, 'tcx, D>
where
D: DropElaborator<'b, 'tcx>,
{
elaborator: &'l mut D,
elaborator: &'a mut D,
source_info: SourceInfo,
@ -192,7 +192,7 @@ pub fn elaborate_drop<'b, 'tcx, D>(
DropCtxt { elaborator, source_info, place, path, succ, unwind }.elaborate_drop(bb)
}
impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D>
impl<'a, 'b, 'tcx, D> DropCtxt<'a, 'b, 'tcx, D>
where
D: DropElaborator<'b, 'tcx>,
'tcx: 'b,

View file

@ -17,7 +17,7 @@ impl<'a> MaybeStorageLive<'a> {
}
}
impl<'tcx, 'a> crate::AnalysisDomain<'tcx> for MaybeStorageLive<'a> {
impl<'a, 'tcx> crate::AnalysisDomain<'tcx> for MaybeStorageLive<'a> {
type Domain = BitSet<Local>;
const NAME: &'static str = "maybe_storage_live";
@ -39,7 +39,7 @@ impl<'tcx, 'a> crate::AnalysisDomain<'tcx> for MaybeStorageLive<'a> {
}
}
impl<'tcx, 'a> crate::GenKillAnalysis<'tcx> for MaybeStorageLive<'a> {
impl<'a, 'tcx> crate::GenKillAnalysis<'tcx> for MaybeStorageLive<'a> {
type Idx = Local;
fn domain_size(&self, body: &Body<'tcx>) -> usize {
@ -89,7 +89,7 @@ impl<'a> MaybeStorageDead<'a> {
}
}
impl<'tcx, 'a> crate::AnalysisDomain<'tcx> for MaybeStorageDead<'a> {
impl<'a, 'tcx> crate::AnalysisDomain<'tcx> for MaybeStorageDead<'a> {
type Domain = BitSet<Local>;
const NAME: &'static str = "maybe_storage_dead";
@ -110,7 +110,7 @@ impl<'tcx, 'a> crate::AnalysisDomain<'tcx> for MaybeStorageDead<'a> {
}
}
impl<'tcx, 'a> crate::GenKillAnalysis<'tcx> for MaybeStorageDead<'a> {
impl<'a, 'tcx> crate::GenKillAnalysis<'tcx> for MaybeStorageDead<'a> {
type Idx = Local;
fn domain_size(&self, body: &Body<'tcx>) -> usize {