Skip to content

Instantly share code, notes, and snippets.

@bvssvni
Created June 14, 2014 13:00
Show Gist options
  • Save bvssvni/d1c7712ecc53696e72d2 to your computer and use it in GitHub Desktop.
Save bvssvni/d1c7712ecc53696e72d2 to your computer and use it in GitHub Desktop.
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 },
^~~~~~~~~
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