summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2026-04-28 16:10:59 +0300
committerGary Guo <gary@garyguo.net>2026-05-11 00:58:34 +0300
commite5cece935531997cd9903c129cc9a2471ed05a4b (patch)
tree9627dca00742f9bffc1b95b166c7115b35568f3b /include
parent3dc01266cdf02b7abf733b022f6b936be567fc17 (diff)
downloadlinux-e5cece935531997cd9903c129cc9a2471ed05a4b.tar.xz
rust: pin-init: internal: turn `PhantomPinned` error into warnings
The `PhantomPinned` detection is just a lint, and is emitted as an error because there is no `compile_warning!()` macro, and `proc-macro-diagnostics` is not stable. Use of `#[deprecated = ""]` attribute to approximate custom proc-macro warnings. A new line is added before message for visual clarity. An example warning with this trick looks like this: warning: use of deprecated function `_::warn`: The field `pin` of type `PhantomPinned` only has an effect if it has the `#[pin]` attribute --> test.rs:9:5 | 9 | pin: marker::PhantomPinned, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Suggested-by: Benno Lossin <lossin@kernel.org> Link: https://github.com/Rust-for-Linux/pin-init/issues/51 Link: https://patch.msgid.link/20260428-pin-init-sync-v1-10-07f9bd3859fb@garyguo.net Signed-off-by: Gary Guo <gary@garyguo.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions