Skip to content

Commit 1649a89

Browse files
AaronErhardtbilelmoussaoui
authored andcommitted
Update gir: Use docsrs attribute
1 parent c1119a0 commit 1649a89

File tree

165 files changed

+2281
-2301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+2281
-2301
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
0.5=0.5
4141
0.4=0.4
4242
0.3=0.3
43+
RUSTFLAGS: --cfg docsrs
4344
steps:
4445
- uses: actions/checkout@v2
4546
with:
@@ -77,7 +78,7 @@ jobs:
7778
-p gsk4 -p gsk4-sys
7879
-p gtk4 -p gtk4-sys
7980
-p gtk4-macros
80-
--features "dox" --no-deps
81+
--no-deps
8182
8283
- name: Fix broken URLs
8384
run: |

gdk4-wayland/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ rust-version = "1.64"
1515
[features]
1616
v4_4 = ["ffi/v4_4"]
1717
v4_10 = ["ffi/v4_10", "v4_4"]
18-
dox = ["ffi/dox", "gdk/dox", "gio/dox", "glib/dox", "xkb_crate", "wayland_crate", "egl"]
1918
wayland_crate = ["wayland-client", "wayland-backend"]
2019
egl = ["khronos-egl"]
2120
xkb_crate = ["xkb"]
2221

2322
[package.metadata.docs.rs]
24-
features = ["dox"]
23+
rustdoc-args = ["--cfg", "docsrs"]
2524

2625
[dependencies]
2726
ffi = {path = "./sys", package = "gdk4-wayland-sys", version = "0.7"}

gdk4-wayland/src/auto/versions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Generated by gir (https://github.com/gtk-rs/gir @ 2358cc24efd2)
1+
Generated by gir (https://github.com/gtk-rs/gir @ 8a280cee2cbb)
22
from gir-files (https://github.com/gtk-rs/gir-files @ 1254daed0202)

gdk4-wayland/src/lib.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

33
#![doc = include_str!("../README.md")]
4-
#![cfg_attr(feature = "dox", feature(doc_cfg))]
4+
#![cfg_attr(docsrs, feature(doc_cfg))]
55

66
pub use ffi;
77
pub use gdk;
88
pub use gio;
99
pub use glib;
10-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
11-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
10+
#[cfg(any(feature = "wayland_crate", docsrs))]
11+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
1212
pub use wayland_client;
1313

14-
#[cfg(any(all(feature = "v4_4", feature = "egl"), feature = "dox"))]
15-
#[cfg_attr(feature = "dox", doc(cfg(all(feature = "v4_4", feature = "egl"))))]
14+
#[cfg(any(all(feature = "v4_4", feature = "egl"), docsrs))]
15+
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "egl"))))]
1616
pub use khronos_egl;
1717

18-
#[cfg(any(all(feature = "v4_4", feature = "xkb_crate"), feature = "dox"))]
19-
#[cfg_attr(
20-
feature = "dox",
21-
doc(cfg(all(feature = "v4_4", feature = "xkb_crate")))
22-
)]
18+
#[cfg(any(all(feature = "v4_4", feature = "xkb_crate"), docsrs))]
19+
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "xkb_crate"))))]
2320
pub use xkb;
2421

2522
mod auto;

gdk4-wayland/src/wayland_device.rs

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

3-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
4-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
3+
#[cfg(any(feature = "wayland_crate", docsrs))]
4+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
55
use crate::prelude::*;
66
use crate::WaylandDevice;
7-
#[cfg(any(feature = "wayland_crate", feature = "dox", feature = "xkb_crate"))]
7+
#[cfg(any(feature = "wayland_crate", docsrs, feature = "xkb_crate"))]
88
#[cfg_attr(
9-
feature = "dox",
9+
docsrs,
1010
doc(cfg(any(feature = "wayland_crate", feature = "xkb_crate")))
1111
)]
1212
use glib::translate::*;
1313

14-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
15-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
14+
#[cfg(any(feature = "wayland_crate", docsrs))]
15+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
1616
use wayland_client::{
1717
backend::ObjectId,
1818
protocol::{wl_keyboard::WlKeyboard, wl_pointer::WlPointer, wl_seat::WlSeat},
1919
Proxy,
2020
};
2121

22-
#[cfg(any(all(feature = "v4_4", feature = "xkb_crate"), feature = "dox"))]
23-
#[cfg_attr(
24-
feature = "dox",
25-
doc(cfg(all(feature = "v4_4", feature = "xkb_crate")))
26-
)]
22+
#[cfg(any(all(feature = "v4_4", feature = "xkb_crate"), docsrs))]
23+
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "xkb_crate"))))]
2724
use xkb::Keymap;
2825

2926
impl WaylandDevice {
3027
#[doc(alias = "gdk_wayland_device_get_wl_keyboard")]
3128
#[doc(alias = "get_wl_keyboard")]
32-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
33-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
29+
#[cfg(any(feature = "wayland_crate", docsrs))]
30+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
3431
pub fn wl_keyboard(&self) -> Option<WlKeyboard> {
3532
let display = self.display().downcast::<crate::WaylandDisplay>().unwrap();
3633
unsafe {
@@ -49,8 +46,8 @@ impl WaylandDevice {
4946

5047
#[doc(alias = "gdk_wayland_device_get_wl_pointer")]
5148
#[doc(alias = "get_wl_pointer")]
52-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
53-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
49+
#[cfg(any(feature = "wayland_crate", docsrs))]
50+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
5451
pub fn wl_pointer(&self) -> Option<WlPointer> {
5552
let display = self.display().downcast::<crate::WaylandDisplay>().unwrap();
5653
unsafe {
@@ -68,8 +65,8 @@ impl WaylandDevice {
6865

6966
#[doc(alias = "gdk_wayland_device_get_wl_seat")]
7067
#[doc(alias = "get_wl_seat")]
71-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
72-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
68+
#[cfg(any(feature = "wayland_crate", docsrs))]
69+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
7370
pub fn wl_seat(&self) -> Option<WlSeat> {
7471
let display = self.display().downcast::<crate::WaylandDisplay>().unwrap();
7572
unsafe {
@@ -85,11 +82,8 @@ impl WaylandDevice {
8582
}
8683
}
8784

88-
#[cfg(any(all(feature = "v4_4", feature = "xkb_crate"), feature = "dox"))]
89-
#[cfg_attr(
90-
feature = "dox",
91-
doc(cfg(all(feature = "v4_4", feature = "xkb_crate")))
92-
)]
85+
#[cfg(any(all(feature = "v4_4", feature = "xkb_crate"), docsrs))]
86+
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "xkb_crate"))))]
9387
#[doc(alias = "gdk_wayland_device_get_xkb_keymap")]
9488
#[doc(alias = "get_xkb_keymap")]
9589
pub fn xkb_keymap(&self) -> Option<Keymap> {

gdk4-wayland/src/wayland_display.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

33
use crate::WaylandDisplay;
4-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
5-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
4+
#[cfg(any(feature = "wayland_crate", docsrs))]
5+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
66
use glib::{once_cell::sync::Lazy, prelude::*, translate::*, Quark};
77

8-
#[cfg(any(all(feature = "v4_4", feature = "egl"), feature = "dox"))]
9-
#[cfg_attr(feature = "dox", doc(cfg(all(feature = "v4_4", feature = "egl"))))]
8+
#[cfg(any(all(feature = "v4_4", feature = "egl"), docsrs))]
9+
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "egl"))))]
1010
use khronos_egl as egl;
1111

12-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
13-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
12+
#[cfg(any(feature = "wayland_crate", docsrs))]
13+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
1414
use wayland_client::{
1515
backend::ObjectId,
1616
protocol::{wl_compositor::WlCompositor, wl_display::WlDisplay},
1717
Proxy,
1818
};
1919

20-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
20+
#[cfg(any(feature = "wayland_crate", docsrs))]
2121
static WAYLAND_DISPLAY_CONNECTION_QUARK: Lazy<Quark> =
2222
Lazy::new(|| Quark::from_str("gtk-rs-wayland-display-connection-quark"));
2323

2424
impl WaylandDisplay {
25-
#[cfg(any(all(feature = "v4_4", feature = "egl"), feature = "dox"))]
26-
#[cfg_attr(feature = "dox", doc(cfg(all(feature = "v4_4", feature = "egl"))))]
25+
#[cfg(any(all(feature = "v4_4", feature = "egl"), docsrs))]
26+
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "egl"))))]
2727
#[doc(alias = "gdk_wayland_display_get_egl_display")]
2828
#[doc(alias = "get_egl_display")]
2929
pub fn egl_display(&self) -> Option<egl::Display> {
@@ -39,8 +39,8 @@ impl WaylandDisplay {
3939

4040
#[doc(alias = "gdk_wayland_display_get_wl_compositor")]
4141
#[doc(alias = "get_wl_compositor")]
42-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
43-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
42+
#[cfg(any(feature = "wayland_crate", docsrs))]
43+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
4444
pub fn wl_compositor(&self) -> Option<WlCompositor> {
4545
unsafe {
4646
let compositor_ptr = ffi::gdk_wayland_display_get_wl_compositor(self.to_glib_none().0);
@@ -58,8 +58,8 @@ impl WaylandDisplay {
5858

5959
#[doc(alias = "gdk_wayland_display_get_wl_display")]
6060
#[doc(alias = "get_wl_display")]
61-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
62-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
61+
#[cfg(any(feature = "wayland_crate", docsrs))]
62+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
6363
pub fn wl_display(&self) -> Option<WlDisplay> {
6464
unsafe {
6565
let display_ptr = ffi::gdk_wayland_display_get_wl_display(self.to_glib_none().0);

gdk4-wayland/src/wayland_monitor.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

33
use crate::WaylandMonitor;
4-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
5-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
4+
#[cfg(any(feature = "wayland_crate", docsrs))]
5+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
66
use {crate::prelude::*, glib::translate::*};
77

8-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
9-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
8+
#[cfg(any(feature = "wayland_crate", docsrs))]
9+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
1010
use wayland_client::{backend::ObjectId, protocol::wl_output::WlOutput, Proxy};
1111

1212
impl WaylandMonitor {
1313
#[doc(alias = "gdk_wayland_monitor_get_wl_output")]
1414
#[doc(alias = "get_wl_output")]
15-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
16-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
15+
#[cfg(any(feature = "wayland_crate", docsrs))]
16+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
1717
pub fn wl_output(&self) -> Option<WlOutput> {
1818
let display = self.display().downcast::<crate::WaylandDisplay>().unwrap();
1919
unsafe {

gdk4-wayland/src/wayland_seat.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

33
use crate::WaylandSeat;
4-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
5-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
4+
#[cfg(any(feature = "wayland_crate", docsrs))]
5+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
66
use {crate::prelude::*, glib::translate::*};
77

8-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
9-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
8+
#[cfg(any(feature = "wayland_crate", docsrs))]
9+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
1010
use wayland_client::{backend::ObjectId, protocol::wl_seat::WlSeat, Proxy};
1111

1212
impl WaylandSeat {
1313
#[doc(alias = "gdk_wayland_seat_get_wl_seat")]
1414
#[doc(alias = "get_wl_seat")]
15-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
16-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
15+
#[cfg(any(feature = "wayland_crate", docsrs))]
16+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
1717
pub fn wl_seat(&self) -> Option<WlSeat> {
1818
let display = self.display().downcast::<crate::WaylandDisplay>().unwrap();
1919
unsafe {

gdk4-wayland/src/wayland_surface.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

33
use crate::{prelude::*, WaylandSurface};
4-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
5-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
4+
#[cfg(any(feature = "wayland_crate", docsrs))]
5+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
66
use glib::translate::*;
77

8-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
9-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
8+
#[cfg(any(feature = "wayland_crate", docsrs))]
9+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
1010
use wayland_client::{backend::ObjectId, protocol::wl_surface::WlSurface, Proxy};
1111

1212
// rustdoc-stripper-ignore-next
1313
/// Trait containing manually implemented methods of [`WaylandSurface`](crate::WaylandSurface).
1414
pub trait WaylandSurfaceExtManual: 'static {
1515
#[doc(alias = "gdk_wayland_surface_get_wl_surface")]
1616
#[doc(alias = "get_wl_surface")]
17-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
18-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
17+
#[cfg(any(feature = "wayland_crate", docsrs))]
18+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
1919
fn wl_surface(&self) -> Option<WlSurface>;
2020
}
2121

2222
impl<O: IsA<WaylandSurface>> WaylandSurfaceExtManual for O {
23-
#[cfg(any(feature = "wayland_crate", feature = "dox"))]
24-
#[cfg_attr(feature = "dox", doc(cfg(feature = "wayland_crate")))]
23+
#[cfg(any(feature = "wayland_crate", docsrs))]
24+
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
2525
fn wl_surface(&self) -> Option<WlSurface> {
2626
let display = self
2727
.as_ref()

gdk4-wayland/sys/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ version = "4.4"
2323
version = "4.10"
2424

2525
[package.metadata.docs.rs]
26-
features = ["dox"]
26+
features = []
2727

2828
[lib]
2929
name = "gdk4_wayland_sys"
3030

3131
[features]
32-
dox = ["glib/dox"]
3332
v4_4 = []
3433
v4_10 = ["v4_4"]
3534

0 commit comments

Comments
 (0)