Skip to content

Commit 43c34c4

Browse files
committed
fix core::os::darwin::objc doctests
1 parent 92bf0d3 commit 43c34c4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

library/core/src/os/darwin/objc.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ pub type SEL = *mut objc_selector;
6868
/// # Example
6969
///
7070
/// ```no_run
71-
/// let string_class = class!("NSString");
71+
/// #![feature(darwin_objc)]
72+
/// use core::os::darwin::objc;
73+
///
74+
/// let string_class = objc::class!("NSString");
7275
/// ```
7376
#[allow_internal_unstable(rustc_attrs)]
7477
pub macro class($classname:expr) {{
@@ -91,8 +94,11 @@ pub macro class($classname:expr) {{
9194
/// # Examples
9295
///
9396
/// ```no_run
94-
/// let alloc_sel = selector!("alloc");
95-
/// let init_sel = selector!("initWithCString:encoding:");
97+
/// #![feature(darwin_objc)]
98+
/// use core::os::darwin::objc;
99+
///
100+
/// let alloc_sel = objc::selector!("alloc");
101+
/// let init_sel = objc::selector!("initWithCString:encoding:");
96102
/// ```
97103
#[allow_internal_unstable(rustc_attrs)]
98104
pub macro selector($methname:expr) {{

0 commit comments

Comments
 (0)