Skip to content

Commit fbd386d

Browse files
committed
crater: check impact of ignoring outlived regions in alias liveness
1 parent 7af913f commit fbd386d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
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.

0 commit comments

Comments
 (0)