From 90fcc1f81f3712fdabe318371a4d2dd4a8388fac Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Thu, 16 May 2024 21:36:56 +0200 Subject: [PATCH] Remove `crate::` prefix from visible intradoc link names --- wayland-client/src/event_queue.rs | 12 +++++++++--- wayland-server/src/dispatch.rs | 4 +++- wayland-server/src/global.rs | 4 +++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/wayland-client/src/event_queue.rs b/wayland-client/src/event_queue.rs index 038aca4bcd3..10f7e6c8000 100644 --- a/wayland-client/src/event_queue.rs +++ b/wayland-client/src/event_queue.rs @@ -30,14 +30,18 @@ use crate::{conn::SyncData, Connection, DispatchError, Proxy}; /// /// In the rare case of an interface with *events* creating new objects (in the core protocol, the only /// instance of this is the `wl_data_device.data_offer` event), you'll need to implement the -/// [`Dispatch::event_created_child()`] method. See the [`crate::event_created_child!()`] macro +/// [`Dispatch::event_created_child()`] method. See the [`event_created_child!()`] macro /// for a simple way to do this. /// +/// [`event_created_child!()`]: crate::event_created_child!() +/// /// ## Modularity /// /// To provide generic handlers for downstream usage, it is possible to make an implementation of the trait /// that is generic over the last type argument, as illustrated below. Users will then be able to -/// automatically delegate their implementation to yours using the [`crate::delegate_dispatch!()`] macro. +/// automatically delegate their implementation to yours using the [`delegate_dispatch!()`] macro. +/// +/// [`delegate_dispatch!()`]: crate::delegate_dispatch!() /// /// As a result, when your implementation is instantiated, the last type parameter `State` will be the state /// struct of the app using your generic implementation. You can put additional trait constraints on it to @@ -117,7 +121,9 @@ where /// Method used to initialize the user-data of objects created by events /// /// If the interface does not have any such event, you can ignore it. If not, the - /// [`crate::event_created_child!()`] macro is provided for overriding it. + /// [`event_created_child!()`] macro is provided for overriding it. + /// + /// [`event_created_child!()`]: crate::event_created_child!() #[cfg_attr(coverage, coverage(off))] fn event_created_child(opcode: u16, _qhandle: &QueueHandle) -> Arc { panic!( diff --git a/wayland-server/src/dispatch.rs b/wayland-server/src/dispatch.rs index 82217d89499..ea99edc6750 100644 --- a/wayland-server/src/dispatch.rs +++ b/wayland-server/src/dispatch.rs @@ -31,7 +31,9 @@ use crate::{Client, DisplayHandle, Resource}; /// /// To provide generic handlers for downstream usage, it is possible to make an implementation of the trait /// that is generic over the last type argument, as illustrated below. Users will then be able to -/// automatically delegate their implementation to yours using the [`crate::delegate_dispatch!()`] macro. +/// automatically delegate their implementation to yours using the [`delegate_dispatch!()`] macro. +/// +/// [`delegate_dispatch!()`]: crate::delegate_dispatch!() /// /// As a result, when your implementation is instanciated, the last type parameter `State` will be the state /// struct of the app using your generic implementation. You can put additional trait constraints on it to diff --git a/wayland-server/src/global.rs b/wayland-server/src/global.rs index f6a2647e91a..16f520daa51 100644 --- a/wayland-server/src/global.rs +++ b/wayland-server/src/global.rs @@ -128,7 +128,9 @@ pub trait GlobalDispatch: Sized { /// A helper macro which delegates a set of [`GlobalDispatch`] implementations for a resource to some other type which /// provdes a generic [`GlobalDispatch`] implementation. /// -/// Its usage is similar to the [`crate::delegate_dispatch!()`] macro. +/// Its usage is similar to the [`delegate_dispatch!()`] macro. +/// +/// [`delegate_dispatch!()`]: crate::delegate_dispatch!() #[macro_export] macro_rules! delegate_global_dispatch { ($(@< $( $lt:tt $( : $clt:tt $(+ $dlt:tt )* )? ),+ >)? $dispatch_from:ty : [$interface: ty: $udata: ty] => $dispatch_to: ty) => {