From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 0B91731BC84 for ; Fri, 13 Feb 2026 08:15:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770970542; cv=none; b=Xf8pHrO9V3RU+Gj9neYCR2JeyLu25WeDNbRNH4gF1M9uO2FtS80P3IQt4oLVDfDv0GQqWWFIlwyYxfjtyhlOzG7R7NZ3P66rIJ+iTZ4sr2BrMzX/3LiDX6tAkRMRNVGI1G4esymf2exODUflRH+9/G9viytZL96p6YfZcKJWIxk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770970542; c=relaxed/simple; bh=ONMzuSrIGefFUjDdOGU+2PvM9DC5Ou6joU7zcGGF6tQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=ZkPYbevlCOK5ujyj+2gR+aGVGBnhr/qSqIgtUchLiMDn+IVrgBerW0/fEz+7oq5/TrlBRreO5brl3tp1vBswg0Hemff/537/q6AoKPiN6N9spAvXSs7mcZTPZv7A8grLZccPzbrW2Vo4+MEh8L6oklKQclBx2V8U+tf8nhG4DvQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=FBt28NqB; arc=none smtp.client-ip=209.85.128.73 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=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="FBt28NqB" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4836b7fbf4fso5587975e9.2 for ; Fri, 13 Feb 2026 00:15:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1770970539; x=1771575339; darn=vger.kernel.org; h=content-transfer-encoding:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=ONMzuSrIGefFUjDdOGU+2PvM9DC5Ou6joU7zcGGF6tQ=; b=FBt28NqBsfnD+CXMIIFbeQwIbZHhcNecefdiW1ycFJ4c1Fn27fViTIXuy0RkN1NaVt GUqRm+9xoN4DbBk/BmqCkVoxnGePnn6f6Y9ZHXUGN2noMk6fNSLs6mW46/g2UZuEI8Pj Ff0g7Tm1WvCR4CxCSC/fW8xuodQ/nVh4w2LpqmDYrt9oQlmRN8mWZEaQ5tti53JSxrIL /vz28L4tBhuAnHmGqI5KlI+mNtnB1TyLedeLGXOeSelbQ9eBpy+XOsWLK7SegXHxy27D c35ObPTzsf+PCOvp7GgXuJ8j3Y4lmE1G7EFfeLDXcNKFvT+83sygv2WkWKDve9l1oAnD aRWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770970539; x=1771575339; h=content-transfer-encoding:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=ONMzuSrIGefFUjDdOGU+2PvM9DC5Ou6joU7zcGGF6tQ=; b=WwgcibTeNdl0iJ1h2zszvvl4YgiVJYAx81xGBGoeuEiQksuqnJCHBHwmGpICV63NfW ngZbMo6dQkiSGiZKNqEsmvVm7wxbLmKGJ5AMWScxG7uuT5Jiqi8XK7s4tCY2khoIhwVA fR8+NqJXDZYrDqNovbkj8iqg6iqOPNtqfy3ljZCp9OFs3g4uwXhPkBssAq4VM7FXgkjo w6vdWohcFSoNaud9ui3yeE6n8vK9DnwGJP4Yaqe3VaCFGh/6500yGMOC2jtGdJ/ChPXI +IphW6iGjfRfj8USumbUC0FjGrT61XFIgxZRhuTZxobfX6N+Tt7KoPr5nwoFXH75+n6E H6xw== X-Forwarded-Encrypted: i=1; AJvYcCXSokDkLpAjFPjLB26gd0xyWFTj+OyB8xBb2CVirsELE4KFjZAdVifruF6ucIvz2ClAkmB8i4QD6tsAupg=@vger.kernel.org X-Gm-Message-State: AOJu0YxTBf3tKs4fLvVYFnJYiB3WzquD2Y3dsZzC6n/GSBwUAksWFlpg qbTrggStldCVVrfk/fE5OlggdwOue1Vbh5zWOLHfn9QDWr6oD6FBF1BYxMo+wMfuRDXoLzLXoZG P59Qltphpop5S6uSz9w== X-Received: from wmil11.prod.google.com ([2002:a7b:c44b:0:b0:481:a662:2ac8]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:a43:b0:480:4ae2:def1 with SMTP id 5b1f17b1804b1-48373a07a59mr13877305e9.13.1770970539111; Fri, 13 Feb 2026 00:15:39 -0800 (PST) Date: Fri, 13 Feb 2026 08:15:37 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <87fr77viat.fsf@t14s.mail-host-address-is-not-set> <87y0kytggx.fsf@kernel.org> <87v7g2tesf.fsf@kernel.org> <_ZaFqe4HzW4GSDQTrXKDgkSCr7L9bxUh-h5QPqVlMUHSvE0oRFuZJOPi0JItf3VJXHmaX4PA4QWAGBeG73cJYw==@protonmail.internalid> <87seb6t9t7.fsf@kernel.org> Message-ID: Subject: Re: [PATCH v3 03/12] rust: xarray: add `contains_index` method From: Alice Ryhl To: "Liam R. Howlett" , Andreas Hindborg , Tamir Duberstein , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , "=?utf-8?B?QmrDtnJu?= 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 12:49:09PM -0500, Liam R. Howlett wrote: > * Andreas Hindborg [260212 07:40]: > > "Alice Ryhl" writes: > >=20 > > > 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 wit= h > > >> the current implementation of lifetime analysis in the rust compiler= . > > >> Apparently this kind of code used to be OK [1] but the Rust devs dec= ided > > >> to remove the code that allowed this, because it was causing excessi= ve > > >> 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 so= me > > >> 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. >=20 > Alice, can you provide a link to the rbtree code please? Please see rust/kernel/rbtree.rs in the kernel tree. Alice