diff options
| author | bors <bors@rust-lang.org> | 2022-12-13 22:05:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-13 22:05:28 +0000 |
| commit | 21ee03e0621c70b894e1bfdd8c82ba5aeaabc812 (patch) | |
| tree | 5f852d4bd1f946791f801be0b25b69aa051c9148 /compiler/rustc_mir_dataflow | |
| parent | 0f529f0f49f4dd404b78e605398531c96f220fc5 (diff) | |
| parent | e0e9f3a7b79663154e33aa2853c5bd555eb7b129 (diff) | |
| download | rust-21ee03e0621c70b894e1bfdd8c82ba5aeaabc812.tar.gz rust-21ee03e0621c70b894e1bfdd8c82ba5aeaabc812.zip | |
Auto merge of #105667 - matthiaskrgr:rollup-fexlc0b, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #105147 (Allow unsafe through inline const) - #105438 (Move some codegen-y methods from `rustc_hir_analysis::collect` -> `rustc_codegen_ssa`) - #105464 (Support #[track_caller] on async closures) - #105476 (Change pattern borrowing suggestions to be verbose and remove invalid suggestion) - #105500 (Make some diagnostics not depend on the source of what they reference being available) - #105628 (Small doc fixes) - #105659 (Don't require owned data in `MaybeStorageLive`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_dataflow')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs b/compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs index 18760b6c6fa..8d379b90a86 100644 --- a/compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs +++ b/compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs @@ -3,20 +3,21 @@ pub use super::*; use crate::{CallReturnPlaces, GenKill, Results, ResultsRefCursor}; use rustc_middle::mir::visit::{NonMutatingUseContext, PlaceContext, Visitor}; use rustc_middle::mir::*; +use std::borrow::Cow; use std::cell::RefCell; #[derive(Clone)] -pub struct MaybeStorageLive { - always_live_locals: BitSet<Local>, +pub struct MaybeStorageLive<'a> { + always_live_locals: Cow<'a, BitSet<Local>>, } -impl MaybeStorageLive { - pub fn new(always_live_locals: BitSet<Local>) -> Self { +impl<'a> MaybeStorageLive<'a> { + pub fn new(always_live_locals: Cow<'a, BitSet<Local>>) -> Self { MaybeStorageLive { always_live_locals } } } -impl<'tcx> crate::AnalysisDomain<'tcx> for MaybeStorageLive { +impl<'tcx, 'a> crate::AnalysisDomain<'tcx> for MaybeStorageLive<'a> { type Domain = BitSet<Local>; const NAME: &'static str = "maybe_storage_live"; @@ -38,7 +39,7 @@ impl<'tcx> crate::AnalysisDomain<'tcx> for MaybeStorageLive { } } -impl<'tcx> crate::GenKillAnalysis<'tcx> for MaybeStorageLive { +impl<'tcx, 'a> crate::GenKillAnalysis<'tcx> for MaybeStorageLive<'a> { type Idx = Local; fn statement_effect( |
