diff --git a/src/attr.rs b/src/attr.rs index 5d8589528..589e4278e 100644 --- a/src/attr.rs +++ b/src/attr.rs @@ -85,9 +85,9 @@ ast_struct! { /// [`Attribute::parse_outer`] or [`Attribute::parse_inner`] depending on /// which you intend to parse. /// - /// [`Parse`]: parse::Parse - /// [`ParseStream::parse`]: parse::ParseBuffer::parse - /// [`ParseStream::call`]: parse::ParseBuffer::call + /// [`Parse`]: crate::parse::Parse + /// [`ParseStream::parse`]: crate::parse::ParseBuffer::parse + /// [`ParseStream::call`]: crate::parse::ParseBuffer::call /// /// ``` /// use syn::{Attribute, Ident, Result, Token}; @@ -468,7 +468,7 @@ ast_enum_of_structs! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))] pub enum Meta { Path(Path), diff --git a/src/data.rs b/src/data.rs index febf39acc..9fb97e483 100644 --- a/src/data.rs +++ b/src/data.rs @@ -30,7 +30,7 @@ ast_enum_of_structs! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))] pub enum Fields { /// Named fields of a struct or struct variant such as `Point { x: f64, diff --git a/src/derive.rs b/src/derive.rs index 277fef793..dbb2cf6a8 100644 --- a/src/derive.rs +++ b/src/derive.rs @@ -25,7 +25,7 @@ ast_enum! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))] pub enum Data { Struct(DataStruct), diff --git a/src/file.rs b/src/file.rs index f728ab9ce..760e5a622 100644 --- a/src/file.rs +++ b/src/file.rs @@ -6,6 +6,8 @@ ast_struct! { /// /// Typically `File` objects are created with [`parse_file`]. /// + /// [`parse_file`]: crate::parse_file + /// /// # Example /// /// Parse a Rust source file into a `syn::File` and print out a debug diff --git a/src/generics.rs b/src/generics.rs index 0299d74a8..a3cd5e629 100644 --- a/src/generics.rs +++ b/src/generics.rs @@ -39,7 +39,7 @@ ast_enum_of_structs! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))] pub enum GenericParam { /// A lifetime parameter: `'a: 'b + 'c + 'd`. @@ -499,7 +499,7 @@ ast_enum_of_structs! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))] #[non_exhaustive] pub enum WherePredicate { diff --git a/src/item.rs b/src/item.rs index 22447bb31..95a143659 100644 --- a/src/item.rs +++ b/src/item.rs @@ -24,7 +24,7 @@ ast_enum_of_structs! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] #[non_exhaustive] pub enum Item { @@ -428,7 +428,7 @@ ast_enum_of_structs! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] pub enum UseTree { /// A path prefix of imports in a `use` item: `std::...`. @@ -500,7 +500,7 @@ ast_enum_of_structs! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] #[non_exhaustive] pub enum ForeignItem { @@ -595,7 +595,7 @@ ast_enum_of_structs! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] #[non_exhaustive] pub enum TraitItem { @@ -692,7 +692,7 @@ ast_enum_of_structs! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] #[non_exhaustive] pub enum ImplItem { diff --git a/src/lit.rs b/src/lit.rs index 55565c7b9..c2a6af812 100644 --- a/src/lit.rs +++ b/src/lit.rs @@ -18,7 +18,7 @@ ast_enum_of_structs! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: crate::Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[non_exhaustive] pub enum Lit { /// A UTF-8 string literal: `"foo"`. diff --git a/src/pat.rs b/src/pat.rs index 1e95adb8e..c029bae83 100644 --- a/src/pat.rs +++ b/src/pat.rs @@ -20,7 +20,7 @@ ast_enum_of_structs! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(feature = "full")))] #[non_exhaustive] pub enum Pat { diff --git a/src/restriction.rs b/src/restriction.rs index 8634607c7..70d2853f6 100644 --- a/src/restriction.rs +++ b/src/restriction.rs @@ -9,7 +9,7 @@ ast_enum! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))] pub enum Visibility { /// A public visibility level: `pub`. diff --git a/src/ty.rs b/src/ty.rs index 50aaafb14..55c313979 100644 --- a/src/ty.rs +++ b/src/ty.rs @@ -17,7 +17,7 @@ ast_enum_of_structs! { /// /// This type is a [syntax tree enum]. /// - /// [syntax tree enum]: Expr#syntax-tree-enums + /// [syntax tree enum]: crate::expr::Expr#syntax-tree-enums #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))] #[non_exhaustive] pub enum Type {