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 8 pull requests #104227

Closed
wants to merge 74 commits into from
Closed

Commits on Oct 10, 2022

  1. Configuration menu
    Copy the full SHA
    0f46f27 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d439fb2 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2022

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

Commits on Oct 20, 2022

  1. fix broken links in guide.md

    notJoon committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    8ebc96a View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2022

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

Commits on Oct 22, 2022

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

Commits on Oct 24, 2022

  1. Configuration menu
    Copy the full SHA
    c4bdb8e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4bf9b9b View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2022

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

Commits on Oct 29, 2022

  1. Simplify the procedure

    fix: remove unused import
    koka831 committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    cf90e4f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    319611b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    48efc9d View commit details
    Browse the repository at this point in the history
  4. Update auto generated tests

    unexge committed Oct 29, 2022
    Configuration menu
    Copy the full SHA
    f0a1434 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2022

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

Commits on Oct 31, 2022

  1. Auto merge of rust-lang#13445 - notJoon:modify-dead-links, r=lnicola

    fix) update broken links in guide.md
    
    Hi, I Just fixed some broken links in `guide.md`.
    
    In most cases, it is not connected by an old version (expecially `guide-2019-01`) of the link, so I made some modifications.
    
    Thanks for your time :)
    bors committed Oct 31, 2022
    Configuration menu
    Copy the full SHA
    8142d1f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    db8c752 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#13523 - lowr:fix/adjust-expectation-for-if, r…

    …=lnicola
    
    fix: disregard type variable expectation for if expressions
    
    Fixes rust-lang#13522
    
    As [the comment](https://github.com/rust-lang/rust-analyzer/blob/8142d1f606dc2e52b1d2b8992671e2bd73379f28/crates/hir-ty/src/infer.rs#L1087-L1090) on `Expectation::adjust_for_branches` explains:
    
    > If the expected type is just a type variable, then don't use an expected type. Otherwise, we might write parts of the type when checking the 'then' block which are incompatible with the 'else' branch.
    
    Note that we already use it in match expressions. I've added tests for them too nevertheless.
    bors committed Oct 31, 2022
    Configuration menu
    Copy the full SHA
    07f6efc View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2022

  1. Create Callables for generic types implementing FnOnce

    Jonas Schievink committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    ecad1a9 View commit details
    Browse the repository at this point in the history
  2. Import option in the tests

    Jonas Schievink committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    9f1bb17 View commit details
    Browse the repository at this point in the history
  3. Revert "Record diverging match arms in InferenceResult"

    This reverts commit 319611b.
    Jonas Schievink committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    e110c78 View commit details
    Browse the repository at this point in the history
  4. Fix doc test

    Jonas Schievink committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    72d5b45 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#13516 - unexge:add-convert-match-to-let-else-…

    …assist, r=jonas-schievink
    
    Add `Convert match to let-else` assist
    
    Closes rust-lang/rust-analyzer#13254
    bors committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    d90cb1e View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#13508 - koka831:fix/13492, r=jonas-schievink

    fix: async trait method for `unnecessary_async`
    
    Fix rust-lang/rust-analyzer#13492
    bors committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    a8e97bc View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#13525 - jonas-schievink:generic-call-signatur…

    …e, r=jonas-schievink
    
    feat: show signature help when calling generic types implementing `FnOnce`
    
    This queries chalk for the `FnOnce` impl of callees and takes argument and return types from there, making generic `Callable`s available to the IDE. This makes signature help work for them, and potentially allows other features to take generic callables into account in the future.
    bors committed Nov 1, 2022
    Configuration menu
    Copy the full SHA
    c1305fa View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    62a6cdf View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2022

  1. Auto merge of rust-lang#13517 - feniljain:fix_completions, r=Veykril

    fix: make custom expr prefix completions to understand refs
    
    Possible fix of rust-lang#7929
    
    While reviewing the postfix completion code I saw that while calling `add_custom_postfix_completions` we were doing it under the part where reference was not taken into consideration, but as we are only adding postfix completions with `Expr` scope ( [source](https://github.com/rust-lang/rust-analyzer/blob/ba28e19b7838e3ad4223ae82d074dc3950ef1548/crates/ide-completion/src/completions/postfix.rs#L272) )
    
    I shifted the `add_custom_postfix_completions` call to part where references are considered
    
    I am not sure if this is the correct fix or I am understanding the problem exactly but this small move seemed to have fixed the issue :)
    bors committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    12ced8f View commit details
    Browse the repository at this point in the history
  2. fix: indentation after inserting #must_use

    Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
    feniljain and Veykril authored Nov 2, 2022
    Configuration menu
    Copy the full SHA
    691ce30 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#13359 - feniljain:feat-must-use-option, r=Vey…

    …kril
    
    feat: add config for inserting must_use in `generate_enum_as_method`
    
    Should fix rust-lang#13312
    
    Didn't add a test because I was not sure on how to add test for a specific configuration option, tried to look for the usages for other `AssistConfig` variants but couldn't find any in `tests`. If there is a way to test this, do point me towards it.
    
    I tried to extract the formatting string as a common `template_string` and only have if-else for that, but it didn't compile :(
    
    Also it seems these tests are failing:
    
    ```
    test config::tests::generate_config_documentation ... FAILED
    test config::tests::generate_package_json_config ... FAILED
    ```
    
    Can you also point me to how to correct these 😅  ( I guess there is some command to automatically generate these? )
    bors committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    af1f48d View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#13527 - unexge:use-let-else-stmt-in-convert-t…

    …o-guarded-return-assist, r=jonas-schievink
    
    Use let-else statements in `Convert to guarded return` assist
    
    Follow up for rust-lang/rust-analyzer#13516, addresses remaining part of rust-lang/rust-analyzer#13254 (comment)
    bors committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    6c3ab56 View commit details
    Browse the repository at this point in the history
  5. Bump ovsx

    lnicola committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    adee109 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    56c97a8 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2022

  1. Configuration menu
    Copy the full SHA
    08c2b45 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6073e58 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#13537 - lnicola:ovsx-fail, r=lnicola

    minor: Allow ovsx publishing to fail
    bors committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    f3a6871 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#13456 - emilio:scip-local-symbol, r=Veykril

    scip: Generate symbols for local crates.
    
    Consider something like:
    
    ```
    // a.rs
    pub struct Foo { .. } // Foo is "local 1"
    
    fn something() {
        crate::b::Bar::new() // Bar is "local 1", but of "b.rs"
    }
    
    // b.rs
    pub struct Bar { .. } // "local 1"
    ```
    
    Without this there's no way to disambiguate whether "local 1" references "Bar" or "Foo".
    bors committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    bbcb77e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6750f6b View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2022

  1. Configuration menu
    Copy the full SHA
    3508820 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#13544 - HKalbasi:patch-2, r=Veykril

    Add rustbot features related to PR state labels
    
    It makes rustbot add `S-waiting-on-review` to every new PR, and ``@rustbot` author` and ``@rustbot` review` commands working.
    bors committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    ad633db View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6f09c72 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#13546 - Veykril:unsafe-fn-ptr, r=Veykril

    Lower unsafety of fn pointer and fn item types
    bors committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    cd26032 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    26b5621 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    66900a7 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2022

  1. Auto merge of rust-lang#13454 - justinmmott:master, r=flodiebold

    Fixed local shadowing the caller's argument issue
    
    fix rust-lang/rust-analyzer#12536
    bors committed Nov 5, 2022
    Configuration menu
    Copy the full SHA
    df38770 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    17619de View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#13549 - Veykril:search-fix, r=Veykril

    fix: Fix reference searching only accounting substrings instead of whole identifiers
    
    Fixes rust-lang/rust-analyzer#13498
    bors committed Nov 5, 2022
    Configuration menu
    Copy the full SHA
    2c37e7d View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#13379 - DropDemBits:ide-assists-format-args-c…

    …apture, r=Veykril
    
    internal: Migrate `ide_assists::utils` and `ide_assists::handlers` to use format arg captures (part 1)
    
    This not only serves as making future migration to mutable syntax trees easier, it also finds out what needs to be migrated in the first place.
    
    ~~Aside from the first commit, subsequent commits are structured to only deal with one file/handler at a time.~~
    
    This is the first of 3 PRs, migrating:
    
    Utils:
    
    - `gen_trait_fn_body`
    - `render_snippet`
    - `ReferenceConversion`
      - `convert_type`
      - `getter`
    
    Handlers:
    
    - `add_explicit_type`
    - `add_return_type`
    - `add_turbo_fish`
    - `apply_demorgan`
    - `auto_import`
    - `convert_comment_block`
    - `convert_integer_literal`
    - `convert_into_to_from`
    - `convert_iter_for_each_to_for`
    - `convert_let_else_to_match`
    - `convert_tuple_struct_to_named_struct`
    - `convert_two_arm_bool_match_to_matches_macro`
    - `destructure_tuple_binding`
    - `extract_function`
    - `extract_module`
    - `extract_struct_from_enum_variant`
    - `extract_type_alias`
    - `extract_variable`
    - `fix_visibility`
    bors committed Nov 5, 2022
    Configuration menu
    Copy the full SHA
    afe8f6b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ef46168 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#13435 - DropDemBits:assists-format-args-captu…

    …re-pt3, r=Veykril
    
    Migrate assists to format args captures, part 3
    
    Continuation of rust-lang/rust-analyzer#13379
    
    Migrates:
    
    - `inline_call`
    - `inline_local_variable`
    - `introduce_named_lifetime`
    - `merge_match_arms`
    - `move_from_mod_rs`
    - `move_guard`
    - `move_module_to_file`
    - `move_to_mod_rs`
    - `number_representation`
    - `qualify_method_call`
    - `qualify_path`
    - `raw_string`
    - `remove_dbg`
    - `replace_derive_with_manual_impl`
    - `replace_or_with_or_else`
    - `replace_turbofish_with_explicit_type`
    - `unwrap_tuple`
    - `wrap_return_type_in_result`
    bors committed Nov 5, 2022
    Configuration menu
    Copy the full SHA
    25b1d6f View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#13536 - pd4d10:patch-1, r=Veykril

    docs: add crates section to the manual
    
    closes rust-lang#13533
    
    Added a section to the user manual, to make it easier for users to find the correct crate.
    bors committed Nov 5, 2022
    Configuration menu
    Copy the full SHA
    c06bbfb View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#13550 - Veykril:issue-template, r=lnicola

    minor: Update github issue templates
    bors committed Nov 5, 2022
    Configuration menu
    Copy the full SHA
    e47460b View commit details
    Browse the repository at this point in the history
  9. docs: fix adoc links

    pd4d10 authored Nov 5, 2022
    Configuration menu
    Copy the full SHA
    935eb3f View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#13556 - pd4d10:patch-1, r=lnicola

    docs: fix adoc links
    
    Correct rust-lang#13536 with adoc link syntax
    bors committed Nov 5, 2022
    Configuration menu
    Copy the full SHA
    d03c1c8 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2022

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

Commits on Nov 9, 2022

  1. Configuration menu
    Copy the full SHA
    aa5a326 View commit details
    Browse the repository at this point in the history
  2. Ignore "Change InferCtxtBuilder from enter to build" in git blame

    Because it changed the indentation of many things, this commit caused a lot of diff with no functional changes, so we should ignore it.
    Noratrieb authored Nov 9, 2022
    Configuration menu
    Copy the full SHA
    35ef05a View commit details
    Browse the repository at this point in the history
  3. docs

    BoxyUwU committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    4c197c0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8f9bc6d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0e804b4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    dc76687 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    75b5a98 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9f0e376 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fbce7de View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e807cb3 View commit details
    Browse the repository at this point in the history
  11. rebase conflict

    compiler-errors committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    9568138 View commit details
    Browse the repository at this point in the history
  12. ⬆️ rust-analyzer

    lnicola committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    ff118a8 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2022

  1. Rollup merge of rust-lang#102763 - compiler-errors:nits, r=cjgillot

    Some diagnostic-related nits
    
    1. Use `&mut Diagnostic` instead of `&mut DiagnosticBuilder<'_, T>`
    2. Make `diag.span_suggestions` take an `IntoIterator` instead of `Iterator`, just to remove some `.into_iter` calls on the caller.
    
    idk if I should add a lint to make sure people use `&mut Diagnostic` instead of `&mut DiagnosticBuilder<'_, T>` in cases where we're just, e.g., adding subdiagnostics to the diagnostic... maybe a followup.
    notriddle authored Nov 10, 2022
    Configuration menu
    Copy the full SHA
    4205ebd View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#103443 - mucinoab:recover-colon-as-path-sep…

    …aretor, r=compiler-errors
    
    Parser: Recover from using colon as path separator in imports
    
    I don't know if this is the right approach, any feedback is welcome.
    
    r? `@compiler-errors`
    
    Fixes rust-lang#103269
    notriddle authored Nov 10, 2022
    Configuration menu
    Copy the full SHA
    08046db View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#104046 - RalfJung:run-miri-run, r=oli-obk

    bootstrap: add support for running Miri on a file
    
    This enables:
    ```
    ./x.py run src/tools/miri --stage 0 --args src/tools/miri/tests/pass/hello.rs
    ```
    That can be super helpful for debugging.
    
    Also avoid sharing the Miri sysroot dir with a system-wide (rustup-managed) installation of Miri.
    
    Fixes rust-lang#76666
    notriddle authored Nov 10, 2022
    Configuration menu
    Copy the full SHA
    81405ad View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#104115 - GuillaumeGomez:migrate-crate-searc…

    …h-div, r=notriddle
    
    Migrate crate-search element to CSS variables
    
    There should no UI changes.
    
    r? `@notriddle`
    notriddle authored Nov 10, 2022
    Configuration menu
    Copy the full SHA
    f598efc View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#104190 - Nilstrieb:patch-1, r=compiler-errors

    Ignore "Change InferCtxtBuilder from enter to build" in git blame
    
    Because it changed the indentation of many things, this commit caused a lot of diff with no functional changes, so we should ignore it.
    
    r? `@compiler-errors` as you've complained about this before
    
    The relevant commit: rust-lang@283abbf
    notriddle authored Nov 10, 2022
    Configuration menu
    Copy the full SHA
    1a2aee6 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#104194 - BoxyUwU:early_binder_docs, r=compi…

    …ler-errors
    
    `EarlyBinder` docs
    notriddle authored Nov 10, 2022
    Configuration menu
    Copy the full SHA
    a26b48a View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#104201 - GuillaumeGomez:gui-test-check-file…

    …-errors, r=notriddle
    
    Add check in GUI test for file loading failure
    
    Since rust-lang#101702, some resources location need to be updated in case their content changed because then their hash will change too. This will prevent errors like rust-lang#104114 to happen again.
    
    The second commit is to prevent CORS errors: when a file is linked from a file itself imported, the web browser considers they come from a different domain and therefore triggers the error. The option tells the web browser to ignore this case.
    
    cc `@jsha`
    r? `@notriddle`
    notriddle authored Nov 10, 2022
    Configuration menu
    Copy the full SHA
    52f286d View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#104211 - lnicola:rust-analyzer-2022-11-09, …

    …r=lnicola
    
    ⬆️ rust-analyzer
    
    r? `@ghost`
    notriddle authored Nov 10, 2022
    Configuration menu
    Copy the full SHA
    2b5db56 View commit details
    Browse the repository at this point in the history