From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2B3701B6CE9; Mon, 10 Nov 2025 14:39:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762785549; cv=none; b=bBdighcRGE4h5mFpnasZ8tZlOs9z7LErn22iJ1yp5C3MftNwkAUjHdYnc5ouSbNRIfF30yyk5HNsDORHy07Ti7ADR2eXL5gZszkJM0WzF/VUSDrrd8SFMaRwsbna8mmcUd8kqgqPDrIi6xTYT/aYl4y9hwCvexbdZqDT+A3q74Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762785549; c=relaxed/simple; bh=UfZIIURxKG02GFYs3TglXy1N8g+Xmh2JJT+tt4nBTVs=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=qoZMNIS/UhhnlTlXIqQ8SDHsWnTn7JLwKjtkaSZtAJfNpwQtGoM1qa0EGCr2/yAqVHqrMtf/CUY6bqTR5YMM/81wj1DwGQ/vNx7MFvwvGr6kv4Zma+nCjkNdKKgJjf9Jj4GhO/KFW5B5sPQWMoWrJ47PrTQ39Bl3mXso4QMpaXU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mQhzOK8s; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mQhzOK8s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0A28C4CEF5; Mon, 10 Nov 2025 14:39:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762785547; bh=UfZIIURxKG02GFYs3TglXy1N8g+Xmh2JJT+tt4nBTVs=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=mQhzOK8s/s49v5TaSnR5d5ICY8q9ff+8mRzFyNvkAlhRdiDH3F6AhQtQexwshSaKi ReveQogDQr7jLYtb388kxmjmGA+OlYUKecb/hNFXMF0lByKsKBf7bUo0Qw0ZE3mtLo yesMpZIv/zK8xC17OxIG3C6Oz7xT8GPHz6TkYTZMXVaTVjaRxBZxLShfp8uPsA47+s 21LnIwZ/VY0/aOCk1scjaQ6wYMC1jXsEZYCelzurBdu7+T7D5ZTHyBwXu2V6SWQjpD JtASMzUDzdxzdIF73xvM9RbMfNvP0K8IsjXWGuKwGkt4HAAVYCLKUdGIzdRt3iGWUu xSqpJk0iMHqSg== Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 10 Nov 2025 15:39:01 +0100 Message-Id: Cc: "Rae Moar" , , , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , , , Subject: Re: [PATCH 1/2] rust: allow `unreachable_pub` for doctests From: "Benno Lossin" To: "Miguel Ojeda" , "Greg Kroah-Hartman" , "Rafael J. Wysocki" , "Danilo Krummrich" , "Brendan Higgins" , "David Gow" , "Alex Gaynor" X-Mailer: aerc 0.21.0 References: <20251110113528.1658238-1-ojeda@kernel.org> In-Reply-To: <20251110113528.1658238-1-ojeda@kernel.org> On Mon Nov 10, 2025 at 12:35 PM CET, Miguel Ojeda wrote: > Examples (i.e. doctests) may want to show public items such as structs, > thus the `unreachable_pub` warning is not very helpful. > > Thus allow it for all doctests. > > In addition, remove it from the existing `expect`s we have in a couple > doctests. > > Suggested-by: Alice Ryhl > Link: https://lore.kernel.org/rust-for-linux/aRG9VjsaCjsvAwUn@google.com/ > Signed-off-by: Miguel Ojeda Acked-by: Benno Lossin Cheers, Benno > --- > rust/kernel/init.rs | 2 +- > rust/kernel/types.rs | 2 +- > scripts/rustdoc_test_gen.rs | 1 + > 3 files changed, 3 insertions(+), 2 deletions(-)