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

Rollup of 7 pull requests #92397

Merged
merged 22 commits into from
Dec 29, 2021
Merged

Rollup of 7 pull requests #92397

merged 22 commits into from
Dec 29, 2021

Commits on Dec 27, 2021

  1. Configuration menu
    Copy the full SHA
    b1529a6 View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2021

  1. Rename rustdoc::html::render::cache to search_index

    The old name wasn't very clear, while the new one makes it clear that
    this is the code responsible for creating the search index.
    camelid committed Dec 28, 2021
    Configuration menu
    Copy the full SHA
    60a1abe View commit details
    Browse the repository at this point in the history
  2. rustdoc: Remove some unnecessary cache parameters

    Based on
    rust-lang#80883 (comment).
    The `tcx` parameters do seem to be used though, so I only removed the
    `cache` parameters.
    camelid committed Dec 28, 2021
    Configuration menu
    Copy the full SHA
    e19593f View commit details
    Browse the repository at this point in the history
  3. Move ExternalLocation to clean::types

    It was previously defined in `render::search_index` but wasn't used at
    all there. `clean::types` seems like a better fit since that's where
    `ExternalCrate` is defined.
    camelid committed Dec 28, 2021
    Configuration menu
    Copy the full SHA
    2b801dc View commit details
    Browse the repository at this point in the history
  4. Make search_index functions private where possible

    Now the only two crate-public items are `build_index` and
    `get_index_search_type` (because for some reason the latter is also used
    in `formats::cache`).
    camelid committed Dec 28, 2021
    Configuration menu
    Copy the full SHA
    bd6692c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    afb77a9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5c8e8e5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    406d6d4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4391a11 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    cbccc4a View commit details
    Browse the repository at this point in the history
  10. Only special case struct fields for intra-doc links, not enum variants

    Variants are already handled by `resolve_str_path_error`, rustdoc doesn't need to consider them separately.
    jyn514 authored and camelid committed Dec 28, 2021
    Configuration menu
    Copy the full SHA
    636d6a3 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ad29c17 View commit details
    Browse the repository at this point in the history
  12. Remove unused parameter

    camelid committed Dec 28, 2021
    Configuration menu
    Copy the full SHA
    7d1ec64 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    09104ad View commit details
    Browse the repository at this point in the history
  14. Add regression test for rust-lang#59502

    This issue was fixed using a hacky recursion "fuel" argument, but the
    issue was never minimized nor was a regression test added. The
    underlying bug is still unfixed, so this test should help with fixing it
    and removing the `recurse` hack.
    camelid committed Dec 28, 2021
    Configuration menu
    Copy the full SHA
    908a9d4 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2021

  1. Rollup merge of rust-lang#92075 - jyn514:resolve-cleanup, r=camelid

    rustdoc: Only special case struct fields for intra-doc links, not enum variants
    
    Variants are already handled by `resolve_str_path_error`, rustdoc doesn't need to consider them separately. Thanks `@camelid` for catching this!
    
    Eventually I'd like to fix the "combine this with `variant_field`" comment but that needs `resolve_field` to take a `ty_res` parameter to avoid it being super hacky (cc rust-lang#83761 (comment)).
    
    r? `@camelid`
    matthiaskrgr authored Dec 29, 2021
    Configuration menu
    Copy the full SHA
    e313143 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#92118 - jackh726:type-alias-position-error,…

    … r=petrochenkov
    
    Parse and suggest moving where clauses after equals for type aliases
    
    ~Mostly the same as rust-lang#90076, but doesn't make any syntax changes.~ Whether or not we want to land the syntax changes, we should  parse the invalid where clause position and suggest moving.
    
    r? `@nikomatsakis`
    cc `@petrochenkov` you might have thoughts on implementation
    matthiaskrgr authored Dec 29, 2021
    Configuration menu
    Copy the full SHA
    bee1471 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#92237 - compiler-errors:issue-92100, r=cjgi…

    …llot
    
    Visit expressions in-order when resolving pattern bindings
    
    [edited:] Visit the pattern's sub-expressions before defining any bindings.
    
    Otherwise, we might get into a case where a Lit/Range expression in a pattern has a qpath pointing to a Ident pattern that is defined after it, causing an ICE when lowering to HIR. I have a more detailed explanation in the issue linked.
    
    Fixes rust-lang#92100
    matthiaskrgr authored Dec 29, 2021
    Configuration menu
    Copy the full SHA
    f044c6c View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#92340 - camelid:search-index-cleanup, r=Gui…

    …llaumeGomez
    
    rustdoc: Start cleaning up search index generation
    
    I'm trying to simplify and clean up the code, partly to make rust-lang#90779 easier.
    
    r? `@GuillaumeGomez`
    matthiaskrgr authored Dec 29, 2021
    Configuration menu
    Copy the full SHA
    0e41194 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#92351 - TmLev:master, r=GuillaumeGomez

    Add long error explanation for E0227
    
    Part of the rust-lang#61137.
    matthiaskrgr authored Dec 29, 2021
    Configuration menu
    Copy the full SHA
    c82b2bc View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#92371 - dtolnay:attrblock, r=oli-obk

    Remove pretty printer space inside block with only outer attrs
    
    Follow-up to rust-lang#92238 fixing one of the FIXMEs.
    
    ```rust
    macro_rules! repro {
        ($expr:expr) => {
            stringify!($expr)
        };
    }
    
    fn main() {
        println!("{}", repro!(#[attr] {}));
    }
    ```
    
    Before: `#[attr] { }`
    After: `#[attr] {}`
    matthiaskrgr authored Dec 29, 2021
    Configuration menu
    Copy the full SHA
    5583010 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#92372 - dtolnay:fntype, r=jackh726

    Print space after formal generic params in fn type
    
    Follow-up to rust-lang#92238 fixing one of the FIXMEs.
    
    ```rust
    macro_rules! repro {
        ($ty:ty) => {
            stringify!($ty)
        };
    }
    
    fn main() {
        println!("{}", repro!(for<'a> fn(&'a u8)));
    }
    ```
    
    Before:&ensp;`for<'a>fn(&'a u8)`
    After:&ensp;`for<'a> fn(&'a u8)`
    
    The pretty printer's `print_formal_generic_params` already prints formal generic params correctly with a space, we just need to call it when printing BareFn types instead of reimplementing the printing incorrectly without a space.
    
    https://github.com/rust-lang/rust/blob/83b15bfe1c15f325bc186ebfe3691b729ed59f2b/compiler/rustc_ast_pretty/src/pprust/state.rs#L1394-L1400
    matthiaskrgr authored Dec 29, 2021
    Configuration menu
    Copy the full SHA
    949769c View commit details
    Browse the repository at this point in the history