diff options
author | 2024-08-14 08:05:20 +0000 | |
---|---|---|
committer | 2024-08-23 06:25:59 +0200 | |
commit | 0528ca0a4f858da3369d405af8c76b8248dfeb7b (patch) | |
tree | f399d58d2330aa573b2aec87aee8879e0229a6bc /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | rust: support arrays in target JSON (diff) | |
download | wireguard-linux-0528ca0a4f858da3369d405af8c76b8248dfeb7b.tar.xz wireguard-linux-0528ca0a4f858da3369d405af8c76b8248dfeb7b.zip |
rust: init: add `assert_pinned` macro
Add a macro to statically check if a field of a struct is marked with
`#[pin]` ie that it is structurally pinned. This can be used when
`unsafe` code needs to rely on fields being structurally pinned.
The macro has a special "inline" mode for the case where the type
depends on generic parameters from the surrounding scope.
Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Co-developed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20240814-linked-list-v5-1-f5f5e8075da0@google.com
[ Replaced `compile_fail` with `ignore` and a TODO note. Removed
`pub` from example to clean `unreachable_pub` lint. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions