Change Symbol doc test to no_run

This commit is contained in:
Lilian A. Moraru
2016-03-21 08:49:35 +02:00
parent 8ba09dbd0a
commit f26334bb7e
+3 -6
View File
@@ -108,18 +108,15 @@ impl fmt::Debug for Library {
///
/// # Examples
///
/// ```
/// # #[cfg(all(unix, not(any(target_os="macos", target_os="ios", target_os="android"))))]
/// # fn main() {
/// # use ::libloading::{ Library, Symbol };
/// # let lib = Library::new("libm.so.6").unwrap();
/// ```no_run
/// # use ::libloading::{ Library, Symbol };
/// # let lib = Library::new("libm.so.6").unwrap();
/// let sin: Symbol<unsafe extern fn(f64) -> f64> = unsafe {
/// lib.get(b"sin\0").unwrap()
/// };
///
/// let sine0 = unsafe { sin(0f64) };
/// assert!(sine0 < 0.1E-10);
/// # }
/// ```
pub struct Symbol<'lib, T: 'lib> {
inner: imp::Symbol<T>,