From c1d67391822895adf4d661b3623653920411af44 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 24 Sep 2022 13:45:02 -0700 Subject: [PATCH 1/2] Revert "Work around rustdoc ambiguity bug" This reverts commit ae1983c87afe0e04c884b7d11f513ea6baf54f84. --- src/lib.rs | 8 -------- src/parse_macro_input.rs | 7 +++++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d33a477103..285556dda9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -813,14 +813,6 @@ mod print; //////////////////////////////////////////////////////////////////////////////// -// https://github.com/rust-lang/rust/issues/62830 -#[cfg(feature = "parsing")] -mod rustdoc_workaround { - pub use crate::parse::{self as parse_module}; -} - -//////////////////////////////////////////////////////////////////////////////// - mod error; pub use crate::error::{Error, Result}; diff --git a/src/parse_macro_input.rs b/src/parse_macro_input.rs index 8e1a5ec6b9..52c2921dc1 100644 --- a/src/parse_macro_input.rs +++ b/src/parse_macro_input.rs @@ -4,7 +4,7 @@ /// Refer to the [`parse` module] documentation for more details about parsing /// in Syn. /// -/// [`parse` module]: crate::rustdoc_workaround::parse_module +/// [`parse` module]: parse/index.html /// ///
/// @@ -51,7 +51,7 @@ /// This macro can also be used with the [`Parser` trait] for types that have /// multiple ways that they can be parsed. /// -/// [`Parser` trait]: crate::rustdoc_workaround::parse_module::Parser +/// [`Parser` trait]: parse/trait.Parser.html /// /// ``` /// # extern crate proc_macro; @@ -103,6 +103,9 @@ /// # proc_macro::TokenStream::new() /// # } /// ``` +// +// TODO: change the parse module link to an intra rustdoc link, currently +// blocked on https://github.com/rust-lang/rust/issues/62830 #[macro_export] #[cfg_attr(doc_cfg, doc(cfg(all(feature = "parsing", feature = "proc-macro"))))] macro_rules! parse_macro_input { From 620852b739c3b457eba2af1ba8ff569b292abf5e Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 24 Sep 2022 13:49:54 -0700 Subject: [PATCH 2/2] Link to parse module using an intra rustdoc link --- src/parse_macro_input.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/parse_macro_input.rs b/src/parse_macro_input.rs index 52c2921dc1..6163cd70af 100644 --- a/src/parse_macro_input.rs +++ b/src/parse_macro_input.rs @@ -4,7 +4,7 @@ /// Refer to the [`parse` module] documentation for more details about parsing /// in Syn. /// -/// [`parse` module]: parse/index.html +/// [`parse` module]: mod@crate::parse /// ///
/// @@ -51,7 +51,7 @@ /// This macro can also be used with the [`Parser` trait] for types that have /// multiple ways that they can be parsed. /// -/// [`Parser` trait]: parse/trait.Parser.html +/// [`Parser` trait]: crate::parse::Parser /// /// ``` /// # extern crate proc_macro; @@ -103,9 +103,6 @@ /// # proc_macro::TokenStream::new() /// # } /// ``` -// -// TODO: change the parse module link to an intra rustdoc link, currently -// blocked on https://github.com/rust-lang/rust/issues/62830 #[macro_export] #[cfg_attr(doc_cfg, doc(cfg(all(feature = "parsing", feature = "proc-macro"))))] macro_rules! parse_macro_input {