Skip to content

Commit

Permalink
Work around rustdoc ambiguity bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 10, 2019
1 parent 51b5541 commit ae1983c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/error.rs
Expand Up @@ -19,12 +19,9 @@ pub type Result<T> = std::result::Result<T, Error>;
///
/// Refer to the [module documentation] for details about parsing in Syn.
///
/// [module documentation]: index.html
/// [module documentation]: crate::rustdoc_workaround::parse_module
///
/// *This type is available if Syn is built with the `"parsing"` feature.*
//
// TODO: change the parse module link to an intra rustdoc link, currently
// blocked on https://github.com/rust-lang/rust/issues/62830
pub struct Error {
// Span is implemented as an index into a thread-local interner to keep the
// size small. It is not safe to access from a different thread. We want
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Expand Up @@ -569,6 +569,11 @@ mod thread;
#[allow(non_camel_case_types)]
struct private;

// https://github.com/rust-lang/rust/issues/62830
mod rustdoc_workaround {
pub use crate::parse::{self as parse_module};
}

////////////////////////////////////////////////////////////////////////////////

mod error;
Expand Down
5 changes: 1 addition & 4 deletions src/parse_macro_input.rs
Expand Up @@ -4,7 +4,7 @@
/// Refer to the [`parse` module] documentation for more details about parsing
/// in Syn.
///
/// [`parse` module]: parse/index.html
/// [`parse` module]: crate::rustdoc_workaround::parse_module
///
/// # Intended usage
///
Expand Down Expand Up @@ -36,9 +36,6 @@
/// # "".parse().unwrap()
/// }
/// ```
//
// TODO: change the parse module link to an intra rustdoc link, currently
// blocked on https://github.com/rust-lang/rust/issues/62830
#[macro_export(local_inner_macros)]
macro_rules! parse_macro_input {
($tokenstream:ident as $ty:ty) => {
Expand Down

0 comments on commit ae1983c

Please sign in to comment.