rust/syn/gen/fold.rs
Source file repositories/reference/linux-study-clean/rust/syn/gen/fold.rs
File Facts
- System
- Linux kernel
- Corpus path
rust/syn/gen/fold.rs- Extension
.rs- Size
- 137051 bytes
- Lines
- 3905
- Domain
- Rust Kernel Layer
- Bucket
- Rust API Membrane
- Inferred role
- Rust Kernel Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
Rust-side wrappers and abstractions around kernel C APIs, ownership contracts, allocation, synchronization, and module integration.
- Rust-side wrappers and abstractions around kernel C APIs, ownership contracts, allocation, synchronization, and module integration.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
// SPDX-License-Identifier: Apache-2.0 OR MIT
// This file is @generated by syn-internal-codegen.
// It is not intended for manual editing.
#![allow(unreachable_code, unused_variables)]
#![allow(
clippy::match_wildcard_for_single_variants,
clippy::needless_match,
clippy::needless_pass_by_ref_mut,
)]
#[cfg(feature = "full")]
macro_rules! full {
($e:expr) => {
$e
};
}
#[cfg(all(feature = "derive", not(feature = "full")))]
macro_rules! full {
($e:expr) => {
unreachable!()
};
}
/// Syntax tree traversal to transform the nodes of an owned syntax tree.
///
/// See the [module documentation] for details.
///
/// [module documentation]: self
pub trait Fold {
#[cfg(any(feature = "derive", feature = "full"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
fn fold_abi(&mut self, i: crate::Abi) -> crate::Abi {
fold_abi(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
fn fold_angle_bracketed_generic_arguments(
&mut self,
i: crate::AngleBracketedGenericArguments,
) -> crate::AngleBracketedGenericArguments {
fold_angle_bracketed_generic_arguments(self, i)
}
#[cfg(feature = "full")]
#[cfg_attr(docsrs, doc(cfg(feature = "full")))]
fn fold_arm(&mut self, i: crate::Arm) -> crate::Arm {
fold_arm(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
fn fold_assoc_const(&mut self, i: crate::AssocConst) -> crate::AssocConst {
fold_assoc_const(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
fn fold_assoc_type(&mut self, i: crate::AssocType) -> crate::AssocType {
fold_assoc_type(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
fn fold_attr_style(&mut self, i: crate::AttrStyle) -> crate::AttrStyle {
fold_attr_style(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
fn fold_attribute(&mut self, i: crate::Attribute) -> crate::Attribute {
fold_attribute(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
fn fold_attributes(&mut self, i: Vec<crate::Attribute>) -> Vec<crate::Attribute> {
fold_vec(i, self, Self::fold_attribute)
}
#[cfg(any(feature = "derive", feature = "full"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
fn fold_bare_fn_arg(&mut self, i: crate::BareFnArg) -> crate::BareFnArg {
fold_bare_fn_arg(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
fn fold_bare_variadic(&mut self, i: crate::BareVariadic) -> crate::BareVariadic {
fold_bare_variadic(self, i)
}
#[cfg(any(feature = "derive", feature = "full"))]
#[cfg_attr(docsrs, doc(cfg(any(feature = "derive", feature = "full"))))]
fn fold_bin_op(&mut self, i: crate::BinOp) -> crate::BinOp {
fold_bin_op(self, i)
}
#[cfg(feature = "full")]
#[cfg_attr(docsrs, doc(cfg(feature = "full")))]
fn fold_block(&mut self, i: crate::Block) -> crate::Block {
Annotation
- Atlas domain: Rust Kernel Layer / Rust API Membrane.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.