Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/syn-2.0.119/tests/test_size.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / syn-2.0.119 / tests / test_size.rs` 54 lines ยท 1607 bytes Raw Blame History 1 // Assumes proc-macro2's "span-locations" feature is off. 2 3 use std::mem; 4 use syn::{Expr, Item, Lit, Pat, Type}; 5 6 #[rustversion::attr(before(2022-11-24), ignore = "requires nightly-2022-11-24 or newer")] 7 #[rustversion::attr( 8 since(2022-11-24), 9 cfg_attr(not(target_pointer_width = "64"), ignore = "only applicable to 64-bit") 10 )] 11 #[test] 12 fn test_expr_size() { 13 assert_eq!(mem::size_of::(), 176); 14 } 15 16 #[rustversion::attr(before(2022-09-09), ignore = "requires nightly-2022-09-09 or newer")] 17 #[rustversion::attr( 18 since(2022-09-09), 19 cfg_attr(not(target_pointer_width = "64"), ignore = "only applicable to 64-bit") 20 )] 21 #[test] 22 fn test_item_size() { 23 assert_eq!(mem::size_of::(), 352); 24 } 25 26 #[rustversion::attr(before(2023-04-29), ignore = "requires nightly-2023-04-29 or newer")] 27 #[rustversion::attr( 28 since(2023-04-29), 29 cfg_attr(not(target_pointer_width = "64"), ignore = "only applicable to 64-bit") 30 )] 31 #[test] 32 fn test_type_size() { 33 assert_eq!(mem::size_of::(), 224); 34 } 35 36 #[rustversion::attr(before(2023-04-29), ignore = "requires nightly-2023-04-29 or newer")] 37 #[rustversion::attr( 38 since(2023-04-29), 39 cfg_attr(not(target_pointer_width = "64"), ignore = "only applicable to 64-bit") 40 )] 41 #[test] 42 fn test_pat_size() { 43 assert_eq!(mem::size_of::(), 184); 44 } 45 46 #[rustversion::attr(before(2023-12-20), ignore = "requires nightly-2023-12-20 or newer")] 47 #[rustversion::attr( 48 since(2023-12-20), 49 cfg_attr(not(target_pointer_width = "64"), ignore = "only applicable to 64-bit") 50 )] 51 #[test] 52 fn test_lit_size() { 53 assert_eq!(mem::size_of::(), 24); 54 }