File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -102,11 +102,11 @@ pub struct Header {
102102 cleanup : Option < unsafe extern "C" fn ( i32 , * mut Header ) > ,
103103 // See `new_header` for why this needs to be a separate field.
104104 private1 : MaybeUninit < * const ( ) > ,
105- private_rest : MaybeUninit < [ * const ( ) ; get_unwinder_private_word_count ( ) - 1 ] > ,
105+ private_rest : MaybeUninit < [ * const ( ) ; UNWINDER_PRIVATE_WORD_COUNT - 1 ] > ,
106106}
107107
108108// Data from https://github.com/rust-lang/rust/blob/master/library/unwind/src/libunwind.rs
109- const fn get_unwinder_private_word_count ( ) -> usize {
109+ const UNWINDER_PRIVATE_WORD_COUNT : usize = {
110110 // The Itanium EH ABI says the structure contains 2 private uint64_t words. Some architectures
111111 // decided this means "2 private native words". So on some 32-bit architectures this is two
112112 // 64-bit words, which together with padding amount to 5 native words, and on other
@@ -147,7 +147,7 @@ const fn get_unwinder_private_word_count() -> usize {
147147 } else {
148148 panic ! ( "Unsupported architecture" ) ;
149149 }
150- }
150+ } ;
151151
152152/// Destruct an exception when caught by a foreign runtime.
153153///
You can’t perform that action at this time.
0 commit comments