| 1 |
#![allow(unexpected_cfgs)] |
| 2 |
//! Edition 2024 test. |
| 3 |
|
| 4 |
use ctor::ctor; |
| 5 |
use libc_print::*; |
| 6 |
|
| 7 |
#[ctor(unsafe, priority = 1)] |
| 8 |
unsafe fn priority_1() { |
| 9 |
libc_println!("1"); |
| 10 |
} |
| 11 |
|
| 12 |
#[ctor(unsafe, priority = 2)] |
| 13 |
unsafe fn priority_b() { |
| 14 |
libc_println!("2"); |
| 15 |
} |
| 16 |
|
| 17 |
#[ctor(unsafe, priority = 3)] |
| 18 |
unsafe fn priority_three() { |
| 19 |
libc_println!("3"); |
| 20 |
} |
| 21 |
|
| 22 |
#[ctor(unsafe, priority = 7)] |
| 23 |
unsafe fn z_priority_7() { |
| 24 |
libc_println!("7"); |
| 25 |
} |
| 26 |
|
| 27 |
#[ctor(unsafe, priority = 4)] |
| 28 |
unsafe fn priority_four() { |
| 29 |
libc_println!("4"); |
| 30 |
} |
| 31 |
|
| 32 |
#[ctor(unsafe, priority = late, anonymous)] |
| 33 |
unsafe fn priority_late() { |
| 34 |
libc_println!("late"); |
| 35 |
} |
| 36 |
|
| 37 |
#[ctor(unsafe, priority = 10)] |
| 38 |
unsafe fn priority_10() { |
| 39 |
libc_println!("10"); |
| 40 |
} |
| 41 |
|
| 42 |
#[ctor(unsafe, priority = 5)] |
| 43 |
unsafe fn priority_five() { |
| 44 |
libc_println!("5"); |
| 45 |
} |
| 46 |
|
| 47 |
#[ctor(unsafe, priority = early, anonymous)] |
| 48 |
unsafe fn priority_early() { |
| 49 |
libc_println!("early"); |
| 50 |
} |
| 51 |
|
| 52 |
#[ctor(unsafe, priority = 0)] |
| 53 |
unsafe fn priority_zero() { |
| 54 |
libc_println!("0"); |
| 55 |
} |
| 56 |
|
| 57 |
#[ctor(unsafe, priority = late, anonymous)] |
| 58 |
unsafe fn priority_late() { |
| 59 |
libc_println!("late"); |
| 60 |
} |
| 61 |
|
| 62 |
#[ctor(unsafe, priority = 6)] |
| 63 |
unsafe fn a_priority_6() { |
| 64 |
libc_println!("6"); |
| 65 |
} |
| 66 |
|
| 67 |
#[ctor(unsafe, anonymous)] |
| 68 |
unsafe fn priority_none() { |
| 69 |
libc_println!("no priority"); |
| 70 |
} |
| 71 |
|
| 72 |
#[ctor(unsafe, priority = default, anonymous)] |
| 73 |
unsafe fn priority_default() { |
| 74 |
libc_println!("default"); |
| 75 |
} |
| 76 |
|
| 77 |
#[ctor(unsafe, priority = 8)] |
| 78 |
unsafe fn priority_eight() { |
| 79 |
libc_println!("8"); |
| 80 |
} |
| 81 |
|
| 82 |
#[ctor(unsafe, priority = 9)] |
| 83 |
unsafe fn priority_nine() { |
| 84 |
libc_println!("9"); |
| 85 |
} |
| 86 |
|
| 87 |
#[ctor(unsafe, anonymous)] |
| 88 |
unsafe fn priority_none() { |
| 89 |
libc_println!("no priority"); |
| 90 |
} |
| 91 |
|
| 92 |
#[ctor(unsafe, priority = default, anonymous)] |
| 93 |
unsafe fn priority_default() { |
| 94 |
libc_println!("default"); |
| 95 |
} |
| 96 |
|
| 97 |
#[ctor(unsafe, priority = early, anonymous)] |
| 98 |
unsafe fn priority_early() { |
| 99 |
libc_println!("early"); |
| 100 |
} |
| 101 |
|
| 102 |
fn main() { |
| 103 |
libc_println!("main"); |
| 104 |
} |