3 The tracking issue for this feature is: [#43781]
7 The `doc_cfg` feature allows an API be documented as only available in some specific platforms.
8 This attribute has two effects:
10 1. In the annotated item's documentation, there will be a message saying "This is supported on
13 2. The item's doc-tests will only run on the specific platform.
15 This feature was introduced as part of PR [#43348] to allow the platform-specific parts of the
16 standard library be documented.
21 #[cfg(any(windows, feature = "documentation"))]
23 /// The application's icon in the notification area (a.k.a. system tray).
28 /// extern crate my_awesome_ui_library;
29 /// use my_awesome_ui_library::current_app;
30 /// use my_awesome_ui_library::windows::notification;
32 /// let icon = current_app().get::<notification::Icon>();
34 /// icon.show_message("Hello");
41 [#43781]: https://github.com/rust-lang/rust/issues/43781
42 [#43348]: https://github.com/rust-lang/rust/issues/43348