1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
use link_section::declarative::{section, in_section}; use link_section::TypedSection; section! { #[section(typed)] static FOO: TypedSection<fn()>; } in_section! { #[in_section(FOO)] fn foo() { } } fn main() { }