rust: kernel: remove #[allow(clippy::new_ret_no_self)] · oracle/linux-uek@b2516f7 (original) (raw)

`@@ -35,7 +35,7 @@

`

35

35

`` //! that you need to write <- instead of : for fields that you want to initialize in-place.

``

36

36

`//!

`

37

37

```` //! ```rust


`38`

``

`-

//! # #![allow(clippy::disallowed_names, clippy::new_ret_no_self)]

`

``

`38`

`+

//! # #![allow(clippy::disallowed_names)]

`

`39`

`39`

`//! use kernel::{prelude::*, sync::Mutex, new_mutex};

`

`40`

`40`

`//! # use core::pin::Pin;

`

`41`

`41`

`//! #[pin_data]

`

`@@ -55,7 +55,7 @@

`

`55`

`55`

`` //! (or just the stack) to actually initialize a `Foo`:

``

`56`

`56`

`//!

`

`57`

`57`

```` //! ```rust

58

``

`-

//! # #![allow(clippy::disallowed_names, clippy::new_ret_no_self)]

`

``

58

`+

//! # #![allow(clippy::disallowed_names)]

`

59

59

`//! # use kernel::{prelude::*, sync::Mutex, new_mutex};

`

60

60

`//! # use core::pin::Pin;

`

61

61

`//! # #[pin_data]

`

86

86

`` //! To declare an init macro/function you just return an [impl PinInit<T, E>]:

``

87

87

`//!

`

88

88

```` //! ```rust


`89`

``

`-

//! # #![allow(clippy::disallowed_names, clippy::new_ret_no_self)]

`

``

`89`

`+

//! # #![allow(clippy::disallowed_names)]

`

`90`

`90`

`//! # use kernel::{sync::Mutex, prelude::*, new_mutex, init::PinInit, try_pin_init};

`

`91`

`91`

`//! #[pin_data]

`

`92`

`92`

`//! struct DriverData {

`

`@@ -236,7 +236,7 @@ pub mod macros;

`

`236`

`236`

`/// # Examples

`

`237`

`237`

`///

`

`238`

`238`

```` /// ```rust

239

``

`-

/// # #![allow(clippy::disallowed_names, clippy::new_ret_no_self)]

`

``

239

`+

/// # #![allow(clippy::disallowed_names)]

`

240

240

`/// # use kernel::{init, macros::pin_data, pin_init, stack_pin_init, init::*, sync::Mutex, new_mutex};

`

241

241

`/// # use core::pin::Pin;

`

242

242

`/// #[pin_data]

`

`@@ -288,7 +288,7 @@ macro_rules! stack_pin_init {

`

288

288

`/// # Examples

`

289

289

`///

`

290

290

```` /// ```rust,ignore


`291`

``

`-

/// # #![allow(clippy::disallowed_names, clippy::new_ret_no_self)]

`

``

`291`

`+

/// # #![allow(clippy::disallowed_names)]

`

`292`

`292`

`/// # use kernel::{init, pin_init, stack_try_pin_init, init::*, sync::Mutex, new_mutex};

`

`293`

`293`

`/// # use macros::pin_data;

`

`294`

`294`

`/// # use core::{alloc::AllocError, pin::Pin};

`

`@@ -314,7 +314,7 @@ macro_rules! stack_pin_init {

`

`314`

`314`

```` /// ```

315

315

`///

`

316

316

```` /// ```rust,ignore


`317`

``

`-

/// # #![allow(clippy::disallowed_names, clippy::new_ret_no_self)]

`

``

`317`

`+

/// # #![allow(clippy::disallowed_names)]

`

`318`

`318`

`/// # use kernel::{init, pin_init, stack_try_pin_init, init::*, sync::Mutex, new_mutex};

`

`319`

`319`

`/// # use macros::pin_data;

`

`320`

`320`

`/// # use core::{alloc::AllocError, pin::Pin};

`

`@@ -366,7 +366,7 @@ macro_rules! stack_try_pin_init {

`

`366`

`366`

`` /// The syntax is almost identical to that of a normal `struct` initializer:

``

`367`

`367`

`///

`

`368`

`368`

```` /// ```rust

369

``

`-

/// # #![allow(clippy::disallowed_names, clippy::new_ret_no_self)]

`

``

369

`+

/// # #![allow(clippy::disallowed_names)]

`

370

370

`/// # use kernel::{init, pin_init, macros::pin_data, init::*};

`

371

371

`/// # use core::pin::Pin;

`

372

372

`/// #[pin_data]

`

`@@ -411,7 +411,7 @@ macro_rules! stack_try_pin_init {

`

411

411

`/// To create an initializer function, simply declare it like this:

`

412

412

`///

`

413

413

```` /// ```rust


`414`

``

`-

/// # #![allow(clippy::disallowed_names, clippy::new_ret_no_self)]

`

``

`414`

`+

/// # #![allow(clippy::disallowed_names)]

`

`415`

`415`

`/// # use kernel::{init, pin_init, prelude::*, init::*};

`

`416`

`416`

`/// # use core::pin::Pin;

`

`417`

`417`

`/// # #[pin_data]

`

`@@ -438,7 +438,7 @@ macro_rules! stack_try_pin_init {

`

`438`

`438`

`` /// Users of `Foo` can now create it like this:

``

`439`

`439`

`///

`

`440`

`440`

```` /// ```rust

441

``

`-

/// # #![allow(clippy::disallowed_names, clippy::new_ret_no_self)]

`

``

441

`+

/// # #![allow(clippy::disallowed_names)]

`

442

442

`/// # use kernel::{init, pin_init, macros::pin_data, init::*};

`

443

443

`/// # use core::pin::Pin;

`

444

444

`/// # #[pin_data]

`

`@@ -466,7 +466,7 @@ macro_rules! stack_try_pin_init {

`

466

466

`` /// They can also easily embed it into their own structs:

``

467

467

`///

`

468

468

```` /// ```rust

````

469

``

`-

/// # #![allow(clippy::disallowed_names, clippy::new_ret_no_self)]

`

``

469

`+

/// # #![allow(clippy::disallowed_names)]

`

470

470

`/// # use kernel::{init, pin_init, macros::pin_data, init::*};

`

471

471

`/// # use core::pin::Pin;

`

472

472

`/// # #[pin_data]

`