mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 12:13:51 -04:00
rust: pin-init: remove redundant clippy expects in doc tests
These lints are automatically suppressed inside doc tests. Previously this is needed because kernel builds doc tests with the default set of clippy flags; but now `clippy::disallowed_names` is globally allowed inside doc tests. Reviewed-by: Benno Lossin <lossin@kernel.org> Link: https://patch.msgid.link/20260710-pin-init-sync-v1-3-8fa16cde87ae@garyguo.net Signed-off-by: Gary Guo <gary@garyguo.net>
This commit is contained in:
@@ -70,7 +70,6 @@
|
||||
//! that you need to write `<-` instead of `:` for fields that you want to initialize in-place.
|
||||
//!
|
||||
//! ```rust
|
||||
//! # #![expect(clippy::disallowed_names)]
|
||||
//! # #![feature(allocator_api)]
|
||||
//! # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
|
||||
//! # use core::pin::Pin;
|
||||
@@ -94,7 +93,6 @@
|
||||
//! (or just the stack) to actually initialize a `Foo`:
|
||||
//!
|
||||
//! ```rust
|
||||
//! # #![expect(clippy::disallowed_names)]
|
||||
//! # #![feature(allocator_api)]
|
||||
//! # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
|
||||
//! # use core::{alloc::AllocError, pin::Pin};
|
||||
@@ -456,7 +454,6 @@
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// # #![expect(clippy::disallowed_names)]
|
||||
/// # #![feature(allocator_api)]
|
||||
/// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
|
||||
/// # use pin_init::*;
|
||||
@@ -508,7 +505,6 @@ macro_rules! stack_pin_init {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// # #![expect(clippy::disallowed_names)]
|
||||
/// # #![feature(allocator_api)]
|
||||
/// # #[path = "../examples/error.rs"] mod error; use error::Error;
|
||||
/// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
|
||||
@@ -535,7 +531,6 @@ macro_rules! stack_pin_init {
|
||||
/// ```
|
||||
///
|
||||
/// ```rust
|
||||
/// # #![expect(clippy::disallowed_names)]
|
||||
/// # #![feature(allocator_api)]
|
||||
/// # #[path = "../examples/error.rs"] mod error; use error::Error;
|
||||
/// # #[path = "../examples/mutex.rs"] mod mutex; use mutex::*;
|
||||
@@ -658,7 +653,6 @@ macro_rules! stack_try_pin_init {
|
||||
/// Users of `Foo` can now create it like this:
|
||||
///
|
||||
/// ```rust
|
||||
/// # #![expect(clippy::disallowed_names)]
|
||||
/// # use pin_init::*;
|
||||
/// # use core::pin::Pin;
|
||||
/// # #[pin_data]
|
||||
@@ -1031,7 +1025,6 @@ pub unsafe trait Init<T: ?Sized, E = Infallible>: PinInit<T, E> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// # #![expect(clippy::disallowed_names)]
|
||||
/// use pin_init::{init, init_zeroed, Init};
|
||||
///
|
||||
/// struct Foo {
|
||||
|
||||
Reference in New Issue
Block a user