//! Reference-section example for `link-section`.
#![cfg_attr(linktime_used_linker,feature(used_with_arg))]#![warn(missing_docs)]uselink_section::section;/// Operations.
#[section(mutable)]pubstaticOPERATIONS:link_section::TypedMutableSection<&'staticstr>;modoperations{uselink_section::in_section;#[in_section(super::OPERATIONS)]constOPERATION_1:&'staticstr="operation_1";#[in_section(super::OPERATIONS)]constOPERATION_2:&'staticstr="operation_2";#[in_section(super::OPERATIONS)]constOPERATION_3:&'staticstr="operation_3";}#[allow(unsafe_code)]fnmain(){// This should normally be done in a `ctor`, but for this example we know
// there are no other live threads and we do it here.
{let ops =unsafe{OPERATIONS.as_mut_slice()};
ops.sort_unstable();}for op inOPERATIONS{println!("Operation: {}", op);}}