Created
June 14, 2014 13:00
-
-
Save bvssvni/d1c7712ecc53696e72d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/gl/lib.rs:1939:57: 1939:66 error: cannot transmute to a type that contains type parameters | |
src/gl/lib.rs:1939 std::option::Some(p) => FnPtr { f: unsafe { transmute(p) }, is_loaded: true }, | |
^~~~~~~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl<F> FnPtr<F> { | |
pub fn new(ptr: Option<extern "system" fn()>, failing_fn: F) -> FnPtr<F> { | |
use std::mem::transmute; | |
match ptr { | |
>> std::option::Some(p) => FnPtr { f: unsafe { transmute(p) }, is_loaded: true }, | |
None => FnPtr { f: failing_fn, is_loaded: false }, | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment