From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55FDC3451C6 for ; Thu, 12 Feb 2026 11:20:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=209.85.128.44 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770895211; cv=pass; b=LEKBbxShqFn9dbpn0GXiVvg8r+ef2MVe2Wa81JiMlMQL49m45DQFHaqzLpMa7gwScbcchngSLnZaJIcdHRJ9qxblDrcvkpDkVYW8OG6NB8libnyJR73kKVHc21DlhLBS28Wj5/qnmy63W2B6iL0KWiI0nxBcoSrHeTKjhMQxfKE= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770895211; c=relaxed/simple; bh=uuJZ1LL+pWX0H8ov90r/VJ6P5HuHKOKqyZW4flS2e6U=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Ejd6tqoVCWXRPgBovCRoywkNQc+4XymeZojSmuc9EwxgY1fNle9PZ/yUy4KeeTvtyLjdWT2JEEYwKp67jrjoHMemQTYo4hzJji+nC0hBILyGOggV8yX77So51DgEYFPPGyFYJZG/6DCrB6mYSpxJhSGGwi2WXkMdeLhkVPUvhwQ= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=AtKjQQ83; arc=pass smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AtKjQQ83" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-47edd6111b4so117387485e9.1 for ; Thu, 12 Feb 2026 03:20:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770895209; cv=none; d=google.com; s=arc-20240605; b=BiD9S3GYJmx+Tz4bY6nbo80ic6M12swhZCEgttlTOeIovM+ZrtqGQuvmS7k0TunUEA BO+fIKxPgX7SIqmmEDfMIwgqrpMyybVHHJ1/ghlZSK9ExjX952Txs6i8OWupokCmXywd 0mzVQPkXMT69eIyiuJ+1i0Z1a9M6dDkMl9pGUWNEUkeLNpDD6xQLlHWM1almkC42lTR9 kWQSgtoPhWBLERaadFkRASk30BOu0SnnczGH3eP/vG6tAvwxUiHg+9nAKSXW+lc8/Kln 5+xs4Cyfq1cJHcNt4z8P4ANquj5CroBIp6i7t7l+hLJGlMrLd+FwKMM8U56QzqgBGKE+ 6r7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uuJZ1LL+pWX0H8ov90r/VJ6P5HuHKOKqyZW4flS2e6U=; fh=p9UyRyEfUsqLRQm8BnC66R1uNNhGYKPCi/8KKyV6HHQ=; b=J8g74LJ15cwV6OWNGLAmkXE5IYQEPhUbqr5QWBNelEvfsW9Yy3MbVWPtJjV9k6YrgG fFXn1uK2kxPf5MzohA71SFX88VcJBiIan01aACSjif0API40MikAtc60F8goAghN5HH4 O57M8ZBqYRR+Iz8deBxi7H6xPKrkmzgiQuheCblsJAt3LxPXcgzSKRZR4UnGnVk9HyJs HQ4e+7hUK2za3qnufxlqFAaP7PxuQPbAGN5ZG+KPl68UpkbqUNSfNAX1iQ1Nd3QhiCOh rM+H7FOQa99JA39Gps1HcoNwZKfq9du6BUBizvCrLNFbwZwUPHYPh6kbMmZ7LYr3HDN5 wtFw==; darn=vger.kernel.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1770895208; x=1771500008; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=uuJZ1LL+pWX0H8ov90r/VJ6P5HuHKOKqyZW4flS2e6U=; b=AtKjQQ83Hs4kzFM09uTLDchnFV/MLbtL9D0ZOtsR+GzCDV/zrdp/USxHfiZbpLmoZN X5/nc5KLjcHUX05RBFa0YrEbmPpJaqPLeFGB819nf79mbDsFkncE7eU7TsgA3lvAIsQk cX7oXX4DI7cW2m170BDdeqLxTlzAVuFobosD3p/8YijS2EkbfzUWIbRyD68THDs6KIxF UK2IZEJWz9zv73YnXALsFa3DK4CkDxl5Y9DLetVmZ+Wz1ohIapf5gLyE8OgGW0m0qhnj ysGrwyXmtFJyRFpXByZCwVq8w02y4PZCffIU0DanNL7gJh4Lu7dH6vUohRHF7qYA6fRy ozrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770895209; x=1771500009; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=uuJZ1LL+pWX0H8ov90r/VJ6P5HuHKOKqyZW4flS2e6U=; b=W+FF1Hgl5j8xToDEAREb8d9o30OYZugBmwM1CRPYKAYncvqmbMNHPglQrR2t31B+pY Sb9Uc+sMGk1Je5EUO95jG8c5vB7yA1sUiG/iB4esluLv7sWokW0k2/B6X7tM+tfSJ1e5 NA6jJXC6zQr0Wq06zWzIg25r1DhJg+gWzxyIGt0wD4lx1jn7WPpIjVsSecIXrWE4bXap WZJIAY0rE8zPf//5dYVoGvoLp3ltgmAZQlDTRgAUwDpokz9n6MYAd2Z1Q6pUyuueAVmO 8CjBYSMV7+zz/n6kqpVV4olP7vx40EWvDRotFcLwB/HrAc/2K+cTqyGP+6/1szd/f92H z0ig== X-Forwarded-Encrypted: i=1; AJvYcCUHSngBOKcB+loWK0JMbfBC8ntrRsA8TznYYr7sLqohKCuwGzm9NnMap9RGb6kib5++NMrgbQcrpDeJ+bA=@vger.kernel.org X-Gm-Message-State: AOJu0YwOGzFzx7+S+wFC3Hfn77s6PvW1e6pCbb+LRt8UUp0Kptgt3BQA XacK1pIHKEWfN4E+PWO5Q7N6mUqEsduv+56xcw7/4bp3ntEX96r3EJzjxhBACBfBcnICNuJB2VA 6dTmjd5iiikJrjKOv/zcWLPYWN/VD9xsaLIYZp4IA X-Gm-Gg: AZuq6aIW0zQXYq5gmn2QWjztWP9gLAt/zW9Oy9nWCCXNygVmKi6z576B6vS6UtLrhfk N0IOn7hhN5iDIu6ySF57tu9CRgYouKP8eIqvVprtwvJBcJWTm466lpiQb7/lCzycywe1YKT85wb 5QYGVMIxTlNsiwBXCNMuVf5iOqqWnYz1h96C3p8XYqL1FhL1e9iiNHqEvDy0fuMiZ3/rUtntm0y DBRqdm6r9gVdZqviGMfLBLNFgdqWg+Js63GNF18foTtO5W80YWIYkhDGTaFSmwxprHHHlL8qgR/ mAwQYQmt15Hz7S+ABEN/siFB/8qJsoEjBMFi5aSUwuQSZbPsg3guhiV/0//Sm3M3YInpYg== X-Received: by 2002:a05:600c:a08:b0:46f:c55a:5a8d with SMTP id 5b1f17b1804b1-483656ab4dbmr31192355e9.4.1770895208246; Thu, 12 Feb 2026 03:20:08 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20260209-xarray-entry-send-v3-0-f777c65b8ae2@kernel.org> <20260209-xarray-entry-send-v3-3-f777c65b8ae2@kernel.org> <87fr77viat.fsf@t14s.mail-host-address-is-not-set> <87y0kytggx.fsf@kernel.org> <87v7g2tesf.fsf@kernel.org> In-Reply-To: <87v7g2tesf.fsf@kernel.org> From: Alice Ryhl Date: Thu, 12 Feb 2026 12:19:57 +0100 X-Gm-Features: AZwV_Qh4Uvl5z8msbaXaL0Qyn41nRXBEYB1NV8RVqoJ71paHuFQd8_cFVxm_IPw Message-ID: Subject: Re: [PATCH v3 03/12] rust: xarray: add `contains_index` method To: Andreas Hindborg Cc: "Liam R. Howlett" , Tamir Duberstein , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Trevor Gross , Danilo Krummrich , Lorenzo Stoakes , Vlastimil Babka , Andrew Morton , Christoph Lameter , David Rientjes , Roman Gushchin , Harry Yoo , Daniel Gomez , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 12, 2026 at 11:52=E2=80=AFAM Andreas Hindborg wrote: > > Andreas Hindborg writes: > > > As far as I understand, this is a borrow checker limitation. It is easy > > for us to look at this code and decide that the borrow on line 51 will > > never alias with the borrow on line 49. > > I did a bit of googling, and this seems to be a well known issue with > the current implementation of lifetime analysis in the rust compiler. > Apparently this kind of code used to be OK [1] but the Rust devs decided > to remove the code that allowed this, because it was causing excessive > compilation times [2]. The upside is that this is solved by the new > lifetime analysis implementation called "Polonius" and it is the > intention to replace the existing implementation with Polonius at some > point [3]. I believe the standard fix for this issue is to provide an entry api similar to HashMap::entry(). See the rbtree for an example, as it already provides such API. Alice