62_decl_data_attrs.toy (527B)
1 pub fn @[.bind(.weak), .visibility(.hidden), .section(".text.hot"), .hot, 2 .stack_align(16), .target_features("")] 3 decorated(x: i64): i64 { 4 return x + 1; 5 } 6 7 pub let @[.section(".rodata.tests"), .align(16), .used, .readonly] 8 table: [2]i64 = [20, 21]; 9 10 pub var @[.common, .align(8)] tentative: i64; 11 12 pub alias @[.bind(.weak), .visibility(.hidden)] decorated_alias = decorated; 13 14 fn __user_main(): i64 { 15 tentative = table[0] + table[1]; 16 return decorated(tentative); 17 } 18 19 fn main(): i32 { return __user_main() as i32; }