From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-40131.protonmail.ch (mail-40131.protonmail.ch [185.70.40.131]) (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 C98CEC13B; Wed, 12 Mar 2025 21:30:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741815045; cv=none; b=omLKdgvJaV8WfDJHhgOGqQYOA2fUwVn2pMnAA4rkONAPhPkDpkjKGViDCd4VpjXpCQJEq4TL+ZPt7PrZPSX3l+vvKzBYHeXb9vEtK5vlVh5KMmqTnmZu7zwp4/Xp4GzdC+3lblauzAkPs/mii0PzFcDCmCtOrc/s/Dv7l8U3WS8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741815045; c=relaxed/simple; bh=LO60XXggN+anABLteCj5yJ/uveuP5Rf8+hxgh8hVLs0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fb1AgegdDQAZ+cbcpfU7OdMX+0Jm4fa9pdtN75abGM/2gB+syWzR/ceagBvneBNMKjfepbYEEPibHDIZgfGBC3UGQOCDKFc4nimJUCXrZ2OFA+9GKjoRUouAhwQ4ze2TGYwmAClTsSgOOkvKWvpEcNxtFNhCjlZ45BA4uwtIAVY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=db7SZWhO; arc=none smtp.client-ip=185.70.40.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="db7SZWhO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1741815041; x=1742074241; bh=778zYe9Aon21nmGzdiX6oN8GbRWrDQ7vfoMY5NS12F0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=db7SZWhOzUaLlMzOnZl+tAVoX7Ywpf6RTPMLoaDvI8GIG4p8DrUwaR/a6/Dnreeqp Nu7j1wKrKLhikHuS/8DeqczefnRuHDH9jvByDQK0OBlScdU/xH/dwFotYy9YjJ+SdI VX+EXyGto6Ux00AviB5J7HU5riEBB0ASYa1qrADkr64rcloHoLwkAsUCOTixugCBSg 99Gz5RI11wiwzrdeYAG+h9ki6LQ6ya1INqrFCUYV0dVCmbAENvyRJEKTPk1fpZ1xNE nS4WtSgFpv/MYcelYvI+SD0dnvWoF7pDzZQVnFF6kMq8NclmHvAh9qZtu8iNRITMgl 6OqWA6SEDI/oA== Date: Wed, 12 Mar 2025 21:30:33 +0000 To: Tamir Duberstein From: Benno Lossin Cc: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Greg Kroah-Hartman , "Rafael J. Wysocki" , Brendan Higgins , David Gow , Rae Moar , Bjorn Helgaas , Luis Chamberlain , Russ Weight , Rob Herring , Saravana Kannan , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-pci@vger.kernel.org, linux-block@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 5/5] rust: enable `clippy::as_underscore` lint Message-ID: In-Reply-To: References: <20250309-ptr-as-ptr-v2-0-25d60ad922b7@gmail.com> Feedback-ID: 71780778:user:proton X-Pm-Message-ID: f8edbb297efc28dbae0cc848a6fd0bf94b85de3d Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed Mar 12, 2025 at 10:10 PM CET, Tamir Duberstein wrote: > On Wed, Mar 12, 2025 at 5:04=E2=80=AFPM Tamir Duberstein wrote: >> >> On Wed, Mar 12, 2025 at 5:01=E2=80=AFPM Benno Lossin wrote: >> > Always enable the features, we have `allow(stable_features)` for this >> > reason (then you don't have to do this dance with checking if it's >> > already stable or not :) >> >> It's not so simple. In rustc < 1.84.0 the lints *and* the strict >> provenance APIs are behind `feature(strict_provenance)`. In rustc >=3D >> 1.84.0 the lints are behind `feature(strict_provenance_lints)`. So you >> need to read the config to learn that you need to enable >> `feature(strict_provenance_lints)`. I see... And `strict_provenance_lints` doesn't exist in <1.84? That's a bit of a bummer... But I guess we could have this config option (in `init/Kconfig`): config RUSTC_HAS_STRICT_PROVENANCE =09 def_bool RUSTC_VERSION >=3D 108400 and then do this in `lib.rs`: #![cfg_attr(CONFIG_RUSTC_HAS_STRICT_PROVENANCE, feature(strict_provenan= ce_lints))] > Actually this isn't even the only problem. It seems that > `-Astable_features` doesn't affect features enabled on the command > line at all: > > error[E0725]: the feature `strict_provenance` is not in the list of > allowed features > --> :1:9 > | > 1 | feature(strict_provenance) > | ^^^^^^^^^^^^^^^^^ That's because you need to append the feature to `rust_allowed_features` in `scripts/Makefile.build` (AFAIK). --- Cheers, Benno