Home
last modified time | relevance | path

Searched full:derive (Results 1 – 25 of 263) sorted by relevance

1234567891011

/linux/rust/zerocopy-derive/
H A Dlib.rs11 //! Derive macros for [zerocopy]'s traits.
48 mod derive; module
66 // help: required by the derive of FromBytes
75 /// Defines a derive function named `$outer` which parses its input
81 macro_rules! derive { macro
91 // We wrap in `const_block` as a backstop in case any derive fails
121 derive!(KnownLayout => derive_known_layout => crate::derive::known_layout::derive);
122 derive!(Immutable => derive_immutable => crate::derive::derive_immutable);
123 derive!(TryFromBytes => derive_try_from_bytes => crate::derive::try_from_bytes::derive_try_from_byt…
124 derive!(FromZeros => derive_from_zeros => crate::derive::from_bytes::derive_from_zeros);
[all …]
H A DREADME.md1 # `zerocopy-derive`
3 These source files come from the Rust `zerocopy-derive` crate, version v0.8.54
H A Drepr.rs28 #[cfg_attr(test, derive(Copy, Clone, Debug))]
38 #[cfg_attr(test, derive(Copy, Clone, Debug, Eq, PartialEq))]
46 #[derive(Copy, Clone)]
47 #[cfg_attr(test, derive(Debug, Eq, PartialEq))]
64 #[cfg_attr(test, derive(Copy, Clone, Debug, Eq, PartialEq))]
158 "cannot derive `Unaligned` on type with alignment greater than 1", in unaligned_validate_no_align_gt_1()
268 #[derive(Copy, Clone, PartialEq, Eq)]
269 #[cfg_attr(test, derive(Debug))]
292 #[cfg_attr(test, derive(Debug, Eq, PartialEq))]
303 #[cfg_attr(test, derive(Copy, Clone, Debug, Eq, PartialEq))]
[all …]
/linux/rust/syn/gen/
H A Dvisit_mut.rs8 #[cfg(any(feature = "full", feature = "derive"))]
16 #[cfg(all(feature = "derive", not(feature = "full")))]
32 #[cfg(any(feature = "derive", feature = "full"))]
33 #[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
37 #[cfg(any(feature = "derive", feature = "full"))]
38 #[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
50 #[cfg(any(feature = "derive", feature = "full"))]
51 #[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
55 #[cfg(any(feature = "derive", feature = "full"))]
56 #[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
[all …]
H A Dvisit.rs8 #[cfg(any(feature = "full", feature = "derive"))]
16 #[cfg(all(feature = "derive", not(feature = "full")))]
31 #[cfg(any(feature = "derive", feature = "full"))]
32 #[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
36 #[cfg(any(feature = "derive", feature = "full"))]
37 #[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
49 #[cfg(any(feature = "derive", feature = "full"))]
50 #[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
54 #[cfg(any(feature = "derive", feature = "full"))]
55 #[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
[all …]
H A Dfold.rs18 #[cfg(all(feature = "derive", not(feature = "full")))]
30 #[cfg(any(feature = "derive", feature = "full"))]
31 #[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
35 #[cfg(any(feature = "derive", feature = "full"))]
36 #[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
48 #[cfg(any(feature = "derive", feature = "full"))]
49 #[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
53 #[cfg(any(feature = "derive", feature = "full"))]
54 #[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
58 #[cfg(any(feature = "derive", feature = "full"))]
[all …]
H A Deq.rs6 #[cfg(any(feature = "derive", feature = "full"))]
8 #[cfg(any(feature = "derive", feature = "full"))]
11 #[cfg(any(feature = "derive", feature = "full"))]
18 #[cfg(any(feature = "derive", feature = "full"))]
21 #[cfg(any(feature = "derive", feature = "full"))]
39 #[cfg(any(feature = "derive", feature = "full"))]
42 #[cfg(any(feature = "derive", feature = "full"))]
50 #[cfg(any(feature = "derive", feature = "full"))]
53 #[cfg(any(feature = "derive", feature = "full"))]
61 #[cfg(any(feature = "derive", feature = "full"))]
[all …]
H A Dclone.rs7 #[cfg(any(feature = "derive", feature = "full"))]
17 #[cfg(any(feature = "derive", feature = "full"))]
43 #[cfg(any(feature = "derive", feature = "full"))]
55 #[cfg(any(feature = "derive", feature = "full"))]
67 #[cfg(any(feature = "derive", feature = "full"))]
70 #[cfg(any(feature = "derive", feature = "full"))]
77 #[cfg(any(feature = "derive", feature = "full"))]
89 #[cfg(any(feature = "derive", feature = "full"))]
100 #[cfg(any(feature = "derive", feature = "full"))]
112 #[cfg(any(feature = "derive", feature = "full"))]
[all …]
H A Ddebug.rs8 #[cfg(any(feature = "derive", feature = "full"))]
18 #[cfg(any(feature = "derive", feature = "full"))]
25 #[cfg(any(feature = "derive", feature = "full"))]
50 #[cfg(any(feature = "derive", feature = "full"))]
62 #[cfg(any(feature = "derive", feature = "full"))]
74 #[cfg(any(feature = "derive", feature = "full"))]
89 #[cfg(any(feature = "derive", feature = "full"))]
101 #[cfg(any(feature = "derive", feature = "full"))]
112 #[cfg(any(feature = "derive", feature = "full"))]
124 #[cfg(any(feature = "derive", feature = "full"))]
[all …]
H A Dhash.rs6 #[cfg(any(feature = "derive", feature = "full"))]
9 #[cfg(any(feature = "derive", feature = "full"))]
19 #[cfg(any(feature = "derive", feature = "full"))]
44 #[cfg(any(feature = "derive", feature = "full"))]
56 #[cfg(any(feature = "derive", feature = "full"))]
68 #[cfg(any(feature = "derive", feature = "full"))]
85 #[cfg(any(feature = "derive", feature = "full"))]
96 #[cfg(any(feature = "derive", feature = "full"))]
108 #[cfg(any(feature = "derive", feature = "full"))]
120 #[cfg(any(feature = "derive", feature = "full"))]
[all …]
/linux/rust/syn/
H A Dlib.rs23 //! - **Derives** — Of particular interest to derive macros is
25 //! derive macro. An example below shows using this type in a library that can
26 //! derive implementations of a user-defined trait.
53 //! # Example of a derive macro
55 //! The canonical derive macro using Syn looks like this. We write an ordinary
57 //! the trait we are deriving. Any time that derive appears in the user's code,
99 //! of a derive macro. The example derives a `HeapSize` trait which computes an
111 //! The derive macro allows users to write `#[derive(HeapSize)]` on data
116 //! #[derive(HeapSize)]
136 //! #[derive(HeapSize)]
[all …]
H A Dderive.rs13 #[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
31 #[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
41 #[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
51 #[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
61 #[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
72 use crate::derive::{Data, DataEnum, DataStruct, DataUnion, DeriveInput};
213 use crate::derive::{Data, DeriveInput};
H A Dty.rs23 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
96 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
107 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
122 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
132 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
141 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
149 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
157 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
165 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
175 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
[all …]
H A Dattr.rs57 /// example `#[derive(Copy)]` or `#[precondition(x < 5)]`.
68 /// #[derive(Copy, Clone)]
174 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
186 /// For example this would return the `test` in `#[test]`, the `derive` in
187 /// `#[derive(Copy)]`, and the `path` in `#[path = "sys/windows.rs"]`.
446 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
462 /// A meta list is like the `derive(Copy)` in `#[derive(Copy)]`.
474 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
478 /// A structured list within an attribute, like `derive(Copy, Clone)`.
487 /// A structured list within an attribute, like `derive(Copy, Clone)`.
[all …]
H A Ddata.rs13 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
36 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
53 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
62 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
117 /// The following is a simplistic [`Clone`] derive for structs. (A more
185 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
H A Dgenerics.rs27 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
45 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
60 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
71 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
84 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
275 doc(cfg(all(any(feature = "full", feature = "derive"), feature = "printing")))
283 doc(cfg(all(any(feature = "full", feature = "derive"), feature = "printing")))
291 doc(cfg(all(any(feature = "full", feature = "derive"), feature = "printing")))
356 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
402 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
[all …]
H A Drestriction.rs15 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
32 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
43 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
H A Dmacros.rs4 not(any(feature = "full", feature = "derive")),
42 #[cfg(any(feature = "full", feature = "derive"))]
170 #[cfg(any(feature = "full", feature = "derive"))]
/linux/rust/zerocopy/src/
H A Dlib.rs64 //! You should generally derive these marker traits whenever possible.
104 //! - **`derive`**
105 //! Provides derives for the core marker traits via the `zerocopy-derive`
107 //! necessary to depend on `zerocopy-derive` directly.
110 //! depend on both `zerocopy` and `zerocopy-derive` in your `Cargo.toml`,
112 //! so, do *not* enable the `derive` feature, and list both dependencies in
118 //! zerocopy-derive = "0.X"
122 //! one of your dependencies enables zerocopy's `derive` feature, import
335 // This is a hack to allow zerocopy-derive derives to work in this crate. They
338 #[cfg(any(feature = "derive", test))]
[all …]
H A Dsplit_at.rs23 /// [`#[derive(SplitAt)]`][derive]; e.g.:
27 /// #[derive(SplitAt, KnownLayout)]
38 /// This derive performs a sophisticated, compile-time safety analysis to
50 #[cfg_attr(feature = "derive", doc = "[derive]: zerocopy_derive::SplitAt")]
52 not(feature = "derive"),
53 …doc = concat!("[derive]: https://docs.rs/zerocopy/", env!("CARGO_PKG_VERSION"), "/zerocopy/derive.…
57 diagnostic::on_unimplemented(note = "Consider adding `#[derive(SplitAt)]` to `{Self}`")
114 /// #[derive(SplitAt, FromBytes, KnownLayout, Immutable)]
202 /// #[derive(SplitAt, FromBytes, KnownLayout, IntoBytes)]
277 #[derive(Debug)]
[all …]
/linux/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_binding.h86 * @bi: struct vmw_ctx_bindinfo we derive from.
97 * @bi: struct vmw_ctx_bindinfo we derive from.
108 * @bi: struct vmw_ctx_bindinfo we derive from.
125 * @bi: struct vmw_ctx_bindinfo we derive from.
138 * @bi: struct vmw_ctx_bindinfo we derive from.
153 * @bi: struct vmw_ctx_bindinfo we derive from.
168 * @bi: struct vmw_ctx_bindinfo we derive from.
209 * @bi: struct vmw_ctx_bindinfo we derive from.
/linux/rust/proc-macro2/
H A Dmarker.rs9 #[derive(Copy, Clone)]
12 derive(PartialEq, Eq)
/linux/rust/zerocopy-derive/derive/
H A Dknown_layout.rs159 // the helper struct we are generating, not the derive target in derive_known_layout_for_repr_c_struct()
175 // resolves to the derive target type, not the helper struct we are in derive_known_layout_for_repr_c_struct()
194 // SAFETY: This has the same layout as the derive target type, in derive_known_layout_for_repr_c_struct()
224 // on the derive target type (both by using the same tokens, and in derive_known_layout_for_repr_c_struct()
227 // to have the same layout as the derive target type, except in derive_known_layout_for_repr_c_struct()
250 pub(crate) fn derive(ctx: &Ctx, _top_level: Trait) -> Result<TokenStream, Error> { in derive() function
/linux/rust/pin-init/examples/
H A Dbig_struct_in_place.rs6 #[derive(Debug)]
17 #[derive(Debug)]
/linux/rust/
H A Dbindgen_parameters72 --with-derive-custom-struct .*=MaybeZeroable
73 --with-derive-custom-union .*=MaybeZeroable

1234567891011