From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sendmail.purelymail.com (sendmail.purelymail.com [34.202.193.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7E2334D385 for ; Wed, 1 Jul 2026 01:39:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=34.202.193.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782869992; cv=none; b=r1H8Q5JQVj8MMKcAa15CiB36qg1F1/Np+bapoR1N1WV8ZBGzStZEU20oPbaa3UMWzOwtiM4BX6S4x3hpqiXtQgooS+wknbGEP4JHOzSZ/5yEbLwHmRdGOzDbkv+ufmS75ECEk5MGZf2HJqKmfBNJjXHhOEuOtJl5dwYsn9VcdJI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782869992; c=relaxed/simple; bh=r6P87TDBgKgJToiem87UMdiReewt6xr/ohCDs11d6e0=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=BhC9R9wV1eoH6tK2pTxVM4lTreWSWi2IoesQWzTKdKnHyvdaUCQRcPw3kRAmhezDX4a580qLxDpxCA4X/i+oIH+CWLisjEhbTy9UZuzsvAK1494h9k3cd9rPsJYQw1bRiLD0CLliFSjoUtTW4G2KodvCm4DE9cGSZWd/S3JjvIY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nikableh.moe; spf=pass smtp.mailfrom=nikableh.moe; dkim=pass (2048-bit key) header.d=nikableh.moe header.i=@nikableh.moe header.b=ty5pyvCd; dkim=pass (2048-bit key) header.d=purelymail.com header.i=@purelymail.com header.b=cXfYuPB4; arc=none smtp.client-ip=34.202.193.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nikableh.moe Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nikableh.moe Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nikableh.moe header.i=@nikableh.moe header.b="ty5pyvCd"; dkim=pass (2048-bit key) header.d=purelymail.com header.i=@purelymail.com header.b="cXfYuPB4" DKIM-Signature: a=rsa-sha256; b=ty5pyvCdiB/gXT7reCiVKRSn3vu7aH/IhQvFoLbPIB3r7ppaeCkpOWjPN0MeFU3kWYBS5zTh5s8HiPWB3dwvcfhHpJTtOZUZtd+KD0wiYl5M/D4JGV+8zP4t5pBb9ciB7lxbgTJt1mOxsgi3daUbKpaIM6S7vv4d9LNMv4xsYSmNCc5ODIq2R10vfz474i15b+GYQ/kgPar9/t8OhotFiigOgfMxuwhR4ZOmzgSpNPzLaepX6NzO5Ot7eF/hXU7pYF3Q67+ipHKfndOC8PMd65uYLduTN2Yk3c/1X9PGoNRPKqGjPxZEnBWC2ydadAhSsJb2YE4xVhNgVljHXA53lA==; s=purelymail2; d=nikableh.moe; v=1; bh=r6P87TDBgKgJToiem87UMdiReewt6xr/ohCDs11d6e0=; h=Received:Date:From:To:Subject; DKIM-Signature: a=rsa-sha256; b=cXfYuPB4yzP89CYdlinsWzT50XBgh81sg1gycldmpe8ukBWcEVVXULtTkXSZafY8m6doiJ+cdhVmWAmaMp8pRFq5dINIl+Vbj6h5Kw/AR1JNRsbJMKkGaae3fCFawwRRdlRIE9XlYYrec+U/B08zRskekq0+XdhCoIQSWd0NJn4Nfp0YuGEHk3FzgMAxJJB618bQAYGO6IxzzlflU72NHuAJUtTuLS22KkY+haSyf7SkxVMqheQo2Eidl91074JZRqiZCM97TifVrBfLhYklqnSBkV5903kgM3jPp+Y+Bu0/Fc0/0Qwi7XpN7joY9i0RakQhDpyHyeGZIxp/9bdeAg==; s=purelymail2; d=purelymail.com; v=1; bh=r6P87TDBgKgJToiem87UMdiReewt6xr/ohCDs11d6e0=; h=Feedback-ID:Received:Date:From:To:Subject; Feedback-ID: 209604:18551:null:purelymail X-Pm-Original-To: rust-for-linux@vger.kernel.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPA id 2143755734; Wed, 01 Jul 2026 01:39:12 +0000 (UTC) Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Wed, 01 Jul 2026 03:39:12 +0200 From: Nika Krasnova To: Miguel Ojeda Cc: Miguel Ojeda , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , =?UTF-8?Q?Onur_=C3=96zkan?= , Viresh Kumar , Yury Norov , Lorenzo Stoakes , Brendan Higgins , David Gow , Rae Moar , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org Subject: Re: [PATCH 0/2] rust: kernel: add cfg_select! and use it for config-based selection In-Reply-To: References: <20260629-backport-cfg_select-v1-0-388d5d31d9d4@nikableh.moe> <0eb77f4b7199e9af01d61e0c1ac03c99@purelymail.com> User-Agent: Purely Mail via Roundcube/1.6.16 Message-ID: <4b9622008ce92cfb5da5d96397ce4c36@purelymail.com> X-Sender: nika@nikableh.moe Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit On 2026-06-29 21:07:34 +0200, Miguel Ojeda wrote: > The tracking issue says the latest change was in Rust 1.91.0. Did it > not work there? Were there changes after that? Checked 1.91.0 directly: core::cfg_select is there behind #![feature(cfg_select)] and behaves the same as 1.94.1 -- single-brace expression position included. So 1.91.0 is the cutoff (RUSTC_VERSION >= 109100), nothing changed between 1.91.0 and 1.94.1. > [...] If I understand you correctly, you are saying that even with > the conversion here, we wouldn't even need the expression case, no? That is correct. Everything in this series is item or statement position; nothing uses the expression-operand form. > [...] if we want to go with this one in all versions, then we should > make sure we only allow that subset that cleanly maps to the future. Agreed. I'll restrict the fallback to exactly that subset (item/statement, single braces) by dropping the expression-operand form. Everyone hits the fallback until the MSRV bump, so a non-portable use fails uniformly instead of compiling locally and breaking in linux-next. The accepted subset is a strict subset of core::cfg_select, so the eventual switch needs no call-site changes. (I'll also have the fallback emit compile_error! on no-match, to match core.) > Now, to be honest, the easiest is to just wait a year and then start > using `core`'s directly... i.e. it is not like we are in a rush to > start using it anyway... Fair, I'm fine with dropping it. The counterargument is that the fallback is small and self-contained, and the conversion removes a chunk of easy-to-desync pairs of #[cfg] now rather than in a year. Happy to send a v2 if you want it. -- Nika Krasnova