Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/interpret/intern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fn intern_shallow<'tcx, M: CompileTimeMachine<'tcx>>(
alloc_id: AllocId,
mutability: Mutability,
disambiguator: Option<&mut DisambiguatorState>,
) -> Result<impl Iterator<Item = CtfeProvenance> + 'tcx, InternError> {
) -> Result<impl Iterator<Item = CtfeProvenance> + 'tcx + use<'tcx, M>, InternError> {
trace!("intern_shallow {:?}", alloc_id);
// remove allocation
// FIXME(#120456) - is `swap_remove` correct?
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_expand/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1947,7 +1947,7 @@ fn build_single_delegations<'a, Node: InvocationCollectorNode>(
suffixes: &'a [(Ident, Option<Ident>)],
item_span: Span,
from_glob: bool,
) -> impl Iterator<Item = ast::Item<Node::ItemKind>> + 'a {
) -> impl Iterator<Item = ast::Item<Node::ItemKind>> + 'a + use<'a, Node> {
if suffixes.is_empty() {
// Report an error for now, to avoid keeping stem for resolution and
// stability checks.
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_infer/src/infer/outlives/for_liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ where
// alias.
if outlives_bounds.contains(&tcx.lifetimes.re_static) {
// no
} else if let Some(r) = outlives_bounds.first()
&& outlives_bounds[1..].iter().all(|other_r| other_r == r)
{
assert!(r.type_flags().intersects(ty::TypeFlags::HAS_FREE_REGIONS));
r.visit_with(self);
// } else if let Some(r) = outlives_bounds.first()
// && outlives_bounds[1..].iter().all(|other_r| other_r == r)
// {
// assert!(r.type_flags().intersects(ty::TypeFlags::HAS_FREE_REGIONS));
// r.visit_with(self);
} else {
// Skip lifetime parameters that are not captured, since they do
// not need to be live.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/crates/hir-ty/src/mir/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ impl<'a> MirPrettyCtx<'a> {
}
}

fn hir_display<T: HirDisplay>(&self, ty: &'a T) -> impl Display + 'a {
fn hir_display<T: HirDisplay>(&self, ty: &'a T) -> impl Display + 'a + use<'a, T> {
ty.display_test(self.db, self.display_target)
.with_closure_style(ClosureStyle::ClosureWithSubst)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ impl FunctionBody {
&self,
ctx: &'a AssistContext<'_>,
parent: &SyntaxNode,
) -> impl Iterator<Item = OutlivedLocal> + 'a {
) -> impl Iterator<Item = OutlivedLocal> + 'a + use<'a> {
let parent = parent.clone();
let range = self.text_range();
locals_defined_in_body(&ctx.sema, self)
Expand Down
Loading