Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- error[E0308]: `match` arms have incompatible types
- --> src/lib.rs:89:37
- |
- 87 | let result = catch_unwind(|| match unsafe { CStr::from_ptr(p_name) }.to_bytes() {
- | -------------------------------------------------- `match` arms have incompatible types
- 88 | b"vkCreateInstance" => &CheakoCache_CreateInstance as *const vk::PFN_vkVoidFunction,
- | ------------------------------------------------------------ this is found to be of type `*const Option<unsafe extern "system" fn()>`
- 89 | b"vkGetInstanceProcAddr" => Some(std::mem::transmute::<_, unsafe extern "system" fn()>(
- | _____________________________________^
- 90 | | CheakoCache_GetInstanceProcAddr as *const fn(),
- 91 | | )),
- | |__________^ expected *-ptr, found enum `Option`
- |
- = note: expected type `*const Option<unsafe extern "system" fn()>`
- found enum `Option<unsafe extern "system" fn()>`
- error[E0606]: casting `&unsafe extern "system" fn(*const InstanceCreateInfo, Option<*const AllocationCallbacks>, *mut ash::vk::Instance) -> ash::vk::Result {CheakoCache_CreateInstance}` as `*const Option<unsafe extern "system" fn()>` is invalid
- --> src/lib.rs:88:32
- |
- 88 | b"vkCreateInstance" => &CheakoCache_CreateInstance as *const vk::PFN_vkVoidFunction,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Some errors have detailed explanations: E0308, E0606.
- For more information about an error, try `rustc --explain E0308`.
- warning: `vk_layer_cache` (lib) generated 2 warnings
- error: could not compile `vk_layer_cache` due to 2 previous errors; 2 warnings emitted
Advertisement
Add Comment
Please, Sign In to add comment