From f453cf9df6102e4983edd06c7728afd1345cfcc9 Mon Sep 17 00:00:00 2001 From: jay23606 <4602056+jay23606@users.noreply.github.com> Date: Sat, 14 Nov 2026 11:54:50 -0500 Subject: [PATCH] fix: make HintRef lifetimes explicit Use explicit elided lifetime placeholders on the HintRef return type so the lifetime relationships are clear and the compiler warning is removed. Fixes #5590. --- pyrefly/lib/alt/operators.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrefly/lib/alt/operators.rs b/pyrefly/lib/alt/operators.rs index 5e7aa72902..7a4e013f85 100644 --- a/pyrefly/lib/alt/operators.rs +++ b/pyrefly/lib/alt/operators.rs @@ -519,7 +519,7 @@ impl<'ctx, 'answer, Ans: LookupAnswer> AnswersSolver<'ctx, 'answer, Ans> { Some(self.heap.mk_concrete_tuple(repeated)) } - fn as_hint_for_display(lhs: &Type) -> Option { + fn as_hint_for_display(lhs: &Type) -> Option> { // In an operation between `lhs` and a container display (e.g., `[3]`, `{"a": 0)]`), the // type of the display should be inferred using `lhs` as a hint when the latter is a // container type with a display syntax. Hinting is harmless when the types don't match.