Skip to content

Commit f87afcb

Browse files
Auto merge of #147154 - lqd:crater-liveness-captures, r=<try>
crater: check impact of ignoring outlived regions in alias liveness
2 parents 21a13b8 + 2fb50a2 commit f87afcb

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

compiler/rustc_const_eval/src/interpret/intern.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fn intern_shallow<'tcx, M: CompileTimeMachine<'tcx>>(
106106
alloc_id: AllocId,
107107
mutability: Mutability,
108108
disambiguator: Option<&mut DisambiguatorState>,
109-
) -> Result<impl Iterator<Item = CtfeProvenance> + 'tcx, InternError> {
109+
) -> Result<impl Iterator<Item = CtfeProvenance> + 'tcx + use<'tcx, M>, InternError> {
110110
trace!("intern_shallow {:?}", alloc_id);
111111
// remove allocation
112112
// FIXME(#120456) - is `swap_remove` correct?

compiler/rustc_expand/src/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1947,7 +1947,7 @@ fn build_single_delegations<'a, Node: InvocationCollectorNode>(
19471947
suffixes: &'a [(Ident, Option<Ident>)],
19481948
item_span: Span,
19491949
from_glob: bool,
1950-
) -> impl Iterator<Item = ast::Item<Node::ItemKind>> + 'a {
1950+
) -> impl Iterator<Item = ast::Item<Node::ItemKind>> + 'a + use<'a, Node> {
19511951
if suffixes.is_empty() {
19521952
// Report an error for now, to avoid keeping stem for resolution and
19531953
// stability checks.

compiler/rustc_infer/src/infer/outlives/for_liveness.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ where
8585
// alias.
8686
if outlives_bounds.contains(&tcx.lifetimes.re_static) {
8787
// no
88-
} else if let Some(r) = outlives_bounds.first()
89-
&& outlives_bounds[1..].iter().all(|other_r| other_r == r)
90-
{
91-
assert!(r.type_flags().intersects(ty::TypeFlags::HAS_FREE_REGIONS));
92-
r.visit_with(self);
88+
// } else if let Some(r) = outlives_bounds.first()
89+
// && outlives_bounds[1..].iter().all(|other_r| other_r == r)
90+
// {
91+
// assert!(r.type_flags().intersects(ty::TypeFlags::HAS_FREE_REGIONS));
92+
// r.visit_with(self);
9393
} else {
9494
// Skip lifetime parameters that are not captured, since they do
9595
// not need to be live.

src/tools/rust-analyzer/crates/hir-ty/src/mir/pretty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ impl<'a> MirPrettyCtx<'a> {
486486
}
487487
}
488488

489-
fn hir_display<T: HirDisplay>(&self, ty: &'a T) -> impl Display + 'a {
489+
fn hir_display<T: HirDisplay>(&self, ty: &'a T) -> impl Display + 'a + use<'a, T> {
490490
ty.display_test(self.db, self.display_target)
491491
.with_closure_style(ClosureStyle::ClosureWithSubst)
492492
}

src/tools/rust-analyzer/crates/ide-assists/src/handlers/extract_function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ impl FunctionBody {
10011001
&self,
10021002
ctx: &'a AssistContext<'_>,
10031003
parent: &SyntaxNode,
1004-
) -> impl Iterator<Item = OutlivedLocal> + 'a {
1004+
) -> impl Iterator<Item = OutlivedLocal> + 'a + use<'a> {
10051005
let parent = parent.clone();
10061006
let range = self.text_range();
10071007
locals_defined_in_body(&ctx.sema, self)

0 commit comments

Comments
 (0)