Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow generic parameters in intra-doc links #76934

Merged
merged 7 commits into from
Oct 10, 2020

Commits on Oct 9, 2020

  1. Allow generic parameters in intra-doc links

    The contents of the generics will be mostly ignored (except for warning
    if fully-qualified syntax is used, which is currently unsupported in
    intra-doc links - see issue rust-lang#74563).
    
    * Allow links like `Vec<T>`, `Result<T, E>`, and `Option<Box<T>>`
    * Allow links like `Vec::<T>::new()`
    * Warn on
      * Unbalanced angle brackets (e.g. `Vec<T` or `Vec<T>>`)
      * Missing type to apply generics to (`<T>` or `<Box<T>>`)
      * Use of fully-qualified syntax (`<Vec as IntoIterator>::into_iter`)
      * Invalid path separator (`Vec:<T>:new`)
      * Too many angle brackets (`Vec<<T>>`)
      * Empty angle brackets (`Vec<>`)
    
    Note that this implementation *does* allow some constructs that aren't
    valid in the actual Rust syntax, for example `Box::<T>new()`. That may
    not be supported in rustdoc in the future; it is an implementation
    detail.
    camelid committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    4c765f6 View commit details
    Browse the repository at this point in the history
  2. Fix intra-doc links in core

    Caught by my malformed generics diagnostics!
    camelid committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    6df21a3 View commit details
    Browse the repository at this point in the history
  3. Update rustdoc intra-doc link docs

    * Describe generic parameters feature
    * Make general improvements to the docs
    camelid committed Oct 9, 2020
    Configuration menu
    Copy the full SHA
    b9c299e View commit details
    Browse the repository at this point in the history
  4. Link to GitHub issue re macro resolution

    Co-authored-by: Joshua Nelson <[email protected]>
    camelid and Joshua Nelson authored Oct 9, 2020
    Configuration menu
    Copy the full SHA
    330ce94 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    71ca884 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5883d3d View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2020

  1. Fix query docs

    They were not formatted correctly, so rustdoc was interpreting some
    parts as code. Also cleaned up some other query docs that weren't
    causing issues, but were formatted incorrectly.
    camelid committed Oct 10, 2020
    Configuration menu
    Copy the full SHA
    e2424a2 View commit details
    Browse the repository at this point in the history