Skip to content

Commit af0e1c1

Browse files
committed
glib-macros: Use relative doc links for glib items
1 parent f6b9cfd commit af0e1c1

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

glib-macros/src/lib.rs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ use syn::{parse_macro_input, DeriveInput, NestedMeta};
4444
/// environment variable when running your code (either in the code directly or when running the
4545
/// binary) to either "all" or [`CLONE_MACRO_LOG_DOMAIN`]:
4646
///
47-
/// [`g_debug`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/macro.g_debug.html
48-
/// [`CLONE_MACRO_LOG_DOMAIN`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/constant.CLONE_MACRO_LOG_DOMAIN.html
47+
/// [`g_debug`]: ../glib/macro.g_debug.html
48+
/// [`CLONE_MACRO_LOG_DOMAIN`]: ../glib/constant.CLONE_MACRO_LOG_DOMAIN.html
4949
///
5050
/// ```rust,ignore
5151
/// use glib::CLONE_MACRO_LOG_DOMAIN;
@@ -292,16 +292,16 @@ pub fn clone(item: TokenStream) -> TokenStream {
292292
/// [`clone!`](crate::clone!), as is aliasing captures with the `as` keyword. Notably, these
293293
/// captures are able to reference `Rc` and `Arc` values in addition to `Object` values.
294294
///
295-
/// [`Closure`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/closure/struct.Closure.html
296-
/// [`Closure::new`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/closure/struct.Closure.html#method.new
297-
/// [`Closure::new_local`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/closure/struct.Closure.html#method.new_local
298-
/// [`Closure::invoke`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/closure/struct.Closure.html#method.invoke
299-
/// [`Value`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/value/struct.Value.html
300-
/// [`FromValue`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/value/trait.FromValue.html
301-
/// [`ToValue`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/value/trait.ToValue.html
302-
/// [`Interface`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/object/struct.Interface.html
303-
/// [`Object`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/object/struct.Object.html
304-
/// [`Object::watch_closure`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/object/trait.ObjectExt.html#tymethod.watch_closure
295+
/// [`Closure`]: ../glib/closure/struct.Closure.html
296+
/// [`Closure::new`]: ../glib/closure/struct.Closure.html#method.new
297+
/// [`Closure::new_local`]: ../glib/closure/struct.Closure.html#method.new_local
298+
/// [`Closure::invoke`]: ../glib/closure/struct.Closure.html#method.invoke
299+
/// [`Value`]: ../glib/value/struct.Value.html
300+
/// [`FromValue`]: ../glib/value/trait.FromValue.html
301+
/// [`ToValue`]: ../glib/value/trait.ToValue.html
302+
/// [`Interface`]: ../glib/object/struct.Interface.html
303+
/// [`Object`]: ../glib/object/struct.Object.html
304+
/// [`Object::watch_closure`]: ../glib/object/trait.ObjectExt.html#tymethod.watch_closure
305305
/// **⚠️ IMPORTANT ⚠️**
306306
///
307307
/// `glib` needs to be in scope, so unless it's one of the direct crate dependencies, you need to
@@ -411,7 +411,7 @@ pub fn closure(item: TokenStream) -> TokenStream {
411411
/// This is useful for closures which can't be sent across threads. See the documentation of
412412
/// [`closure!`](crate::closure!) for details.
413413
///
414-
/// [`Closure::new_local`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/closure/struct.Closure.html#method.new_local
414+
/// [`Closure::new_local`]: ../glib/closure/struct.Closure.html#method.new_local
415415
#[proc_macro]
416416
#[proc_macro_error]
417417
pub fn closure_local(item: TokenStream) -> TokenStream {
@@ -438,7 +438,7 @@ pub fn closure_local(item: TokenStream) -> TokenStream {
438438
/// }
439439
/// ```
440440
///
441-
/// [`glib::Value`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/value/struct.Value.html
441+
/// [`glib::Value`]: ../glib/value/struct.Value.html
442442
#[proc_macro_derive(Enum, attributes(enum_type, enum_value))]
443443
#[proc_macro_error]
444444
pub fn enum_derive(input: TokenStream) -> TokenStream {
@@ -476,7 +476,7 @@ pub fn enum_derive(input: TokenStream) -> TokenStream {
476476
/// }
477477
/// ```
478478
///
479-
/// [`glib::Value`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/value/struct.Value.html
479+
/// [`glib::Value`]: ../glib/value/struct.Value.html
480480
#[proc_macro_attribute]
481481
#[proc_macro_error]
482482
pub fn flags(attr: TokenStream, item: TokenStream) -> TokenStream {
@@ -503,7 +503,7 @@ pub fn flags(attr: TokenStream, item: TokenStream) -> TokenStream {
503503
/// }
504504
/// ```
505505
///
506-
/// [`ErrorDomain`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/error/trait.ErrorDomain.html
506+
/// [`ErrorDomain`]: ../glib/error/trait.ErrorDomain.html
507507
#[proc_macro_derive(ErrorDomain, attributes(error_domain))]
508508
#[proc_macro_error]
509509
pub fn error_domain_derive(input: TokenStream) -> TokenStream {
@@ -526,8 +526,8 @@ pub fn error_domain_derive(input: TokenStream) -> TokenStream {
526526
/// struct MyBoxed(String);
527527
/// ```
528528
///
529-
/// [`BoxedType`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/subclass/boxed/trait.BoxedType.html
530-
/// [`glib::Value`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/value/struct.Value.html
529+
/// [`BoxedType`]: ../glib/subclass/boxed/trait.BoxedType.html
530+
/// [`glib::Value`]: ../glib/value/struct.Value.html
531531
#[proc_macro_derive(Boxed, attributes(boxed_nullable, boxed_type))]
532532
#[proc_macro_error]
533533
pub fn boxed_derive(input: TokenStream) -> TokenStream {
@@ -554,8 +554,8 @@ pub fn boxed_derive(input: TokenStream) -> TokenStream {
554554
/// struct MyShared(std::sync::Arc<MySharedInner>);
555555
/// ```
556556
///
557-
/// [`SharedType`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/subclass/shared/trait.SharedType.html
558-
/// [`glib::Value`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/value/struct.Value.html
557+
/// [`SharedType`]: ../glib/subclass/shared/trait.SharedType.html
558+
/// [`glib::Value`]: ../glib/value/struct.Value.html
559559
#[proc_macro_derive(SharedBoxed, attributes(shared_boxed_nullable, shared_boxed_type))]
560560
#[proc_macro_error]
561561
pub fn shared_boxed_derive(input: TokenStream) -> TokenStream {
@@ -592,7 +592,7 @@ pub fn shared_boxed_derive(input: TokenStream) -> TokenStream {
592592
/// }
593593
/// ```
594594
///
595-
/// [`ObjectSubclass`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/subclass/types/trait.ObjectSubclass.html
595+
/// [`ObjectSubclass`]: ../glib/subclass/types/trait.ObjectSubclass.html
596596
#[proc_macro_attribute]
597597
#[proc_macro_error]
598598
pub fn object_subclass(_attr: TokenStream, item: TokenStream) -> TokenStream {
@@ -617,7 +617,7 @@ pub fn object_subclass(_attr: TokenStream, item: TokenStream) -> TokenStream {
617617
/// type Prerequisites = ();
618618
/// ```
619619
///
620-
/// [`ObjectInterface`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/subclass/interface/trait.ObjectInterface.html
620+
/// [`ObjectInterface`]: ../glib/subclass/interface/trait.ObjectInterface.html
621621
#[proc_macro_attribute]
622622
#[proc_macro_error]
623623
pub fn object_interface(_attr: TokenStream, item: TokenStream) -> TokenStream {
@@ -685,8 +685,8 @@ pub fn object_interface(_attr: TokenStream, item: TokenStream) -> TokenStream {
685685
/// }
686686
/// ```
687687
///
688-
/// [`glib::clone::Downgrade`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/clone/trait.Downgrade.html
689-
/// [`glib::clone::Upgrade`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/clone/trait.Upgrade.html
688+
/// [`glib::clone::Downgrade`]: ../glib/clone/trait.Downgrade.html
689+
/// [`glib::clone::Upgrade`]: ../glib/clone/trait.Upgrade.html
690690
#[proc_macro_derive(Downgrade)]
691691
pub fn downgrade(input: TokenStream) -> TokenStream {
692692
let input = parse_macro_input!(input as DeriveInput);
@@ -793,9 +793,9 @@ pub fn downgrade(input: TokenStream) -> TokenStream {
793793
/// assert_eq!(var.get::<MyEnum>(), Some(v));
794794
/// ```
795795
///
796-
/// [`glib::Variant`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/variant/struct.Variant.html
797-
/// [`EnumClass`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/struct.EnumClass.html
798-
/// [`FlagsClass`]: https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/struct.FlagsClass.html
796+
/// [`glib::Variant`]: ../glib/variant/struct.Variant.html
797+
/// [`EnumClass`]: ../glib/struct.EnumClass.html
798+
/// [`FlagsClass`]: ../glib/struct.FlagsClass.html
799799
/// [kebab case]: https://docs.rs/heck/0.4.0/heck/trait.ToKebabCase.html
800800
#[proc_macro_derive(Variant, attributes(variant_enum))]
801801
#[proc_macro_error]

0 commit comments

Comments
 (0)