Skip to content

Commit 186bb41

Browse files
Auto merge of #147154 - lqd:crater-liveness-captures, r=<try>
crater: check impact of ignoring outlived regions in alias liveness
2 parents bd4a800 + b7cf2f4 commit 186bb41

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
shallow = true
55
[submodule "src/tools/cargo"]
66
path = src/tools/cargo
7-
url = https://github.com/rust-lang/cargo.git
7+
url = https://github.com/lqd/cargo.git
88
shallow = true
99
[submodule "src/doc/reference"]
1010
path = src/doc/reference

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
@@ -1954,7 +1954,7 @@ fn build_single_delegations<'a, Node: InvocationCollectorNode>(
19541954
suffixes: &'a [(Ident, Option<Ident>)],
19551955
item_span: Span,
19561956
from_glob: bool,
1957-
) -> impl Iterator<Item = ast::Item<Node::ItemKind>> + 'a {
1957+
) -> impl Iterator<Item = ast::Item<Node::ItemKind>> + 'a + use<'a, Node> {
19581958
if suffixes.is_empty() {
19591959
// Report an error for now, to avoid keeping stem for resolution and
19601960
// 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/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)