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

⬆️ rust-analyzer #115927

Merged
merged 171 commits into from
Sep 18, 2023
Merged

⬆️ rust-analyzer #115927

merged 171 commits into from
Sep 18, 2023

Commits on Aug 3, 2023

  1. proc-macro-test: Pass target to cargo invocation

    When cross compiling macos → dragonfly the dist build fails in the
    proc-maro-test-impl crate with the following error:
    
    ld: unknown option: -z\nclang: error: linker command failed with
    exit code 1 (use -v to see invocation)
    
    This appears to be a wart stemming from using an Apple host for cross
    compiling.  Passing the target along to cargo allows it to pick up
    a linker that it understands and DTRT.
    Alex Zepeda committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    c5d4f73 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2023

  1. stabilize abi_thiscall

    Trolldemorted committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    96b60ed View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#114562 - Trolldemorted:thiscall, r=oli-obk

    stabilize abi_thiscall
    
    Closes rust-lang#42202, stabilizing the use of the "thiscall" ABI.
    
    FCP was substituted by a poll, and the poll has been accepted.
    matthiaskrgr committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    3ea1928 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. feat: riscv-interrupt-{m,s} calling conventions

    Similar to prior support added for the mips430, avr, and x86 targets
    this change implements the rough equivalent of clang's
    [`__attribute__((interrupt))`][clang-attr] for riscv targets, enabling
    e.g.
    
    ```rust
    static mut CNT: usize = 0;
    
    pub extern "riscv-interrupt-m" fn isr_m() {
        unsafe {
            CNT += 1;
        }
    }
    ```
    
    to produce highly effective assembly like:
    
    ```asm
    pub extern "riscv-interrupt-m" fn isr_m() {
    420003a0:       1141                    addi    sp,sp,-16
        unsafe {
            CNT += 1;
    420003a2:       c62a                    sw      a0,12(sp)
    420003a4:       c42e                    sw      a1,8(sp)
    420003a6:       3fc80537                lui     a0,0x3fc80
    420003aa:       63c52583                lw      a1,1596(a0) # 3fc8063c <_ZN12esp_riscv_rt3CNT17hcec3e3a214887d53E.0>
    420003ae:       0585                    addi    a1,a1,1
    420003b0:       62b52e23                sw      a1,1596(a0)
        }
    }
    420003b4:       4532                    lw      a0,12(sp)
    420003b6:       45a2                    lw      a1,8(sp)
    420003b8:       0141                    addi    sp,sp,16
    420003ba:       30200073                mret
    ```
    
    (disassembly via `riscv64-unknown-elf-objdump -C -S --disassemble ./esp32c3-hal/target/riscv32imc-unknown-none-elf/release/examples/gpio_interrupt`)
    
    This outcome is superior to hand-coded interrupt routines which, lacking
    visibility into any non-assembly body of the interrupt handler, have to
    be very conservative and save the [entire CPU state to the stack
    frame][full-frame-save]. By instead asking LLVM to only save the
    registers that it uses, we defer the decision to the tool with the best
    context: it can more accurately account for the cost of spills if it
    knows that every additional register used is already at the cost of an
    implicit spill.
    
    At the LLVM level, this is apparently [implemented by] marking every
    register as "[callee-save]," matching the semantics of an interrupt
    handler nicely (it has to leave the CPU state just as it found it after
    its `{m|s}ret`).
    
    This approach is not suitable for every interrupt handler, as it makes
    no attempt to e.g. save the state in a user-accessible stack frame. For
    a full discussion of those challenges and tradeoffs, please refer to
    [the interrupt calling conventions RFC][rfc].
    
    Inside rustc, this implementation differs from prior art because LLVM
    does not expose the "all-saved" function flavor as a calling convention
    directly, instead preferring to use an attribute that allows for
    differentiating between "machine-mode" and "superivsor-mode" interrupts.
    
    Finally, some effort has been made to guide those who may not yet be
    aware of the differences between machine-mode and supervisor-mode
    interrupts as to why no `riscv-interrupt` calling convention is exposed
    through rustc, and similarly for why `riscv-interrupt-u` makes no
    appearance (as it would complicate future LLVM upgrades).
    
    [clang-attr]: https://clang.llvm.org/docs/AttributeReference.html#interrupt-risc-v
    [full-frame-save]: https://github.com/esp-rs/esp-riscv-rt/blob/9281af2ecffe13e40992917316f36920c26acaf3/src/lib.rs#L440-L469
    [implemented by]: https://github.com/llvm/llvm-project/blob/b7fb2a3fec7c187d58a6d338ab512d9173bca987/llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp#L61-L67
    [callee-save]: https://github.com/llvm/llvm-project/blob/973f1fe7a8591c7af148e573491ab68cc15b6ecf/llvm/lib/Target/RISCV/RISCVCallingConv.td#L30-L37
    [rfc]: rust-lang/rfcs#3246
    sethp committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    c9bc45f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a46eebb View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2023

  1. Configuration menu
    Copy the full SHA
    93b6838 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    465aaed View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d6b97e6 View commit details
    Browse the repository at this point in the history
  4. update Cargo.lock

    Dirreke committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    4ddc6a7 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. v2

    alibektas committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    eed1b3b View commit details
    Browse the repository at this point in the history
  2. Rename CargoHandle to CommandHandle

    This handle wraps an arbitrary command, which might be a rustc command
    rather than cargo.
    Wilfred committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    14078ed View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e286640 View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2023

  1. Configuration menu
    Copy the full SHA
    59f9c95 View commit details
    Browse the repository at this point in the history
  2. fix RA build

    RalfJung committed Aug 20, 2023
    Configuration menu
    Copy the full SHA
    883f16d View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2023

  1. Configuration menu
    Copy the full SHA
    30d8aa1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a4cf405 View commit details
    Browse the repository at this point in the history
  3. internal: unpin serde

    Sered no longer uses blobs as of
    
    serde-rs/serde#2590
    
    As such, there's no longer need for us to pin it.
    
    Note that this doesn't upgrade serde version we use: I am fairly
    confident that the blobs are already there are fine, and now I am fairly
    confident that all future versions of serde will be fine as well.
    matklad committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    343ee8b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6caf79c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7012fff View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2023

  1. Run analysis-stats on stable

    lnicola committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    b4576b5 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15494 - lnicola:sync-from-rust, r=lnicola

    minor: Sync from downstream
    bors committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    7f659a3 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#15495 - matklad:matklad/unpin, r=lnicola

    internal: unpin serde
    
    Serde no longer uses blobs as of
    
    serde-rs/serde#2590
    
    As such, there's no longer need for us to pin it.
    
    Note that this doesn't upgrade serde version we use: I am fairly confident that the blobs are already there are fine, and now I am fairly confident that all future versions of serde will be fine as well.
    bors committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    9b82437 View commit details
    Browse the repository at this point in the history
  4. internal: up lsp-server

    matklad committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    43e8688 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#15499 - matklad:up-lsp-server, r=lnicola

    internal: up lsp-server
    bors committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    9e3bf69 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#115011 - compiler-errors:warn-on-elided-ass…

    …oc-ct-lt, r=cjgillot
    
    Warn on elided lifetimes in associated constants (`ELIDED_LIFETIMES_IN_ASSOCIATED_CONSTANT`)
    
    Elided lifetimes in associated constants (in impls) erroneously resolve to fresh lifetime parameters on the impl since rust-lang#97313. This is not correct behavior (see rust-lang#38831).
    
    I originally opened rust-lang#114716 to fix this, but given the time that has passed, the crater results seem pretty bad: rust-lang#114716 (comment)
    
    This PR alternatively implements a lint against this behavior, and I'm hoping to bump this to deny in a few versions.
    compiler-errors committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    ce0eeee View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2023

  1. SCIP: Report the correct version of rust-analyzer in the metadata

    Previously this was hard coded to "0.1". The SCIP protocol allows this
    to be an arbitrary string:
    
    ```
    message ToolInfo {
      // Name of the indexer that produced this index.
      string name = 1;
      // Version of the indexer that produced this index.
      string version = 2;
      // Command-line arguments that were used to invoke this indexer.
      repeated string arguments = 3;
    }
    ```
    
    so use the same string reported by `rust-analyzer --version`.
    Wilfred committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    bc42b99 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15503 - Wilfred:scip_version, r=Veykril

    SCIP: Report the correct version of rust-analyzer in the metadata
    
    Previously this was hard coded to "0.1". The SCIP protocol allows this to be an arbitrary string:
    
    ```
    message ToolInfo {
      // Name of the indexer that produced this index.
      string name = 1;
      // Version of the indexer that produced this index.
      string version = 2;
      // Command-line arguments that were used to invoke this indexer.
      repeated string arguments = 3;
    }
    ```
    
    so use the same string reported by `rust-analyzer --version`.
    bors committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    6444211 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a4b2503 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#15504 - lnicola:sync-from-rust, r=lnicola

    minor: Sync from downstream
    bors committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    8b8c7d7 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#15385 - inferiorhumanorgans:explicit-cross-ta…

    …rget, r=Veykril
    
    proc-macro-test: Pass target to cargo invocation
    
    When cross compiling macos → dragonfly the dist build fails in the proc-maro-test-impl crate with the following error:
    
    `ld: unknown option: -z\nclang: error: linker command failed with exit code 1 (use -v to see invocation)`
    
    This appears to be a wart stemming from using an Apple host for cross compiling.  Passing the target along to cargo allows it to pick up a linker that it understands and DTRT.
    bors committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    f5b7c60 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2023

  1. Configuration menu
    Copy the full SHA
    4e034d7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3864b43 View commit details
    Browse the repository at this point in the history
  3. Run cargo fmt on 1.72

    HKalbasi committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    fa76f60 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#15512 - HKalbasi:mir, r=HKalbasi

    Update offset intrinsic to match 1.72
    
    fix rust-lang#15498
    bors committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    0a0bb77 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2023

  1. Configuration menu
    Copy the full SHA
    204bc2c View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15517 - xffxff:label_in_condition, r=lnicola

    fix: diagnostics for 'while let' loop with label in condition
    
    fix rust-lang#15516
    bors committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    029baaa View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2023

  1. Configuration menu
    Copy the full SHA
    a0d2761 View commit details
    Browse the repository at this point in the history
  2. Fix release workflow

    lnicola committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    a6f5356 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#15523 - lnicola:bootstrap, r=lnicola

    internal: Fix release workflow
    bors committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    144526c View commit details
    Browse the repository at this point in the history
  4. Add bind_unused_param assistant.

    vsrs committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    e457759 View commit details
    Browse the repository at this point in the history
  5. Add cov_mark tests

    vsrs committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    19e9994 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    514fefa View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#15527 - HKalbasi:diagnostics-allow, r=HKalbasi

    Respect `#[allow(unused_braces)]`
    
    fix rust-lang#15526
    bors committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    62268e4 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2023

  1. Apply suggestions.

    vsrs committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    6b20c1b View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15465 - Wilfred:command_handle_fixes, r=Veykril

    Fix cargo handle logging in flycheck
    
    This PR has two commits, so it's probably easier to review them separately:
    
    (1) Rename `CargoHandle` to `CommandHandle`, as the command may not be a cargo command.
    
    (2) Logging should format the current command, rather than calling `check_command()` again. This ensures that any later configuration changes don't cause us to log incorrect information.
    bors committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    b06503b View commit details
    Browse the repository at this point in the history
  3. Only send inlay hint refresh requests on initial load

    Editor itself is able to invalidate hints after edits, and /refresh was
    sent after editor reports changes to the language server.
    This forces the editor to either query & invalidate the hints twice
    after every edit, or wait for /refresh to come before querying the
    hints.
    
    Both options are rather useless, so instead, send a request on server
    startup only: client editors do not know when the server actually starts
    up, this will help to query the initial hints after editor was open and
    the server was still starting up.
    SomeoneToIgnore committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    62d1897 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6b559c4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1eb6d2e View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2023

  1. Update architecture.md

    Veykril committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    ea74cc4 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15534 - rust-lang:Veykril-patch-1, r=Veykril

    Update architecture.md
    bors committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    3213344 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2023

  1. Less once_cell more std

    Veykril committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    c09f175 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15542 - Veykril:std-once, r=Veykril

    Less `once_cell` more `std`
    bors committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    ce650ce View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    70e21dc View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#15543 - Veykril:less-alloc, r=Veykril

    Remove some allocations in borrowck
    bors committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    074c668 View commit details
    Browse the repository at this point in the history
  5. Shuffle some locking around

    Veykril committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    cc8b786 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0f1cde7 View commit details
    Browse the repository at this point in the history
  7. Use proper assertion in on-type formatting edits

    Co-authored-by: DropDemBits <r3usrlnd@gmail.com>
    SomeoneToIgnore and DropDemBits committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    da78617 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c193909 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#15544 - Veykril:locks, r=Veykril

    Shuffle some locking around
    
    The main thread is still occasionally blocking on something and I am unsure what the cause might be. This will hopefully help somewhat
    bors committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    60182f7 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2023

  1. remove the repetitive word

    Signed-off-by: cui fliter <imcusg@gmail.com>
    cuishuang committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    056b6b9 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15546 - cuishuang:master, r=lnicola

    remove the repetitive word
    bors committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    2557995 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2dbc7e3 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#15548 - Veykril:r-a-restructure, r=Veykril

    Restructure some modules in rust-analyzer crate
    bors committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    8a29d07 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0bf0563 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#15549 - Veykril:unwind-if-cancelled, r=Veykril

    Add a few more `db.unwind_if_cancelled()` calls
    
    Judging from a profile sent by a friend, the borrowck query took up a significant amount of time in their project which might be the cause for some unresponsiveness as nothing in the mir stack currently unwinds on cancellation
    bors committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    0e002fe View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b157552 View commit details
    Browse the repository at this point in the history
  8. Simplify

    Veykril committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    8eddc64 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    81f0108 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#15551 - Veykril:docs, r=Veykril

    Move doc comment handling into ide-db
    bors committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    99686d5 View commit details
    Browse the repository at this point in the history
  11. Resolve inlay hint data

    Skip every propery set in inlay hint client resolve capabilities,
    reducing overall json footprint.
    SomeoneToIgnore committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    e07fbab View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    10464c7 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    caf0185 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    7b3dba5 View commit details
    Browse the repository at this point in the history
  15. Omit hint resolve data better

    Omit sending inlay hint resolve data if inlay has no properties that
    client resolve capabilities support.
    SomeoneToIgnore committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    7f450da View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2023

  1. Configuration menu
    Copy the full SHA
    3a6196b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    520d02f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f76f025 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#15552 - Veykril:metrics-new, r=Veykril

    Bump `rustc-perf` checkout for metrics, replace webrender, diesel and ripgrep with newer versions
    
    The previous versions were removed hence the updates. The metric results for the changed ones are disconnected now as to not muddle things up.
    
    I think it's worth it for us to occasionally bump the `rustc-perf` checkout, as it allows us to include more interesting new targets.
    
    Notably, the newer diesel is 3 times as fast to analyze as the one of the current checkout.
    bors committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    63867dd View commit details
    Browse the repository at this point in the history
  5. Add hyper-0.14.18 to metrics

    Veykril committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    db4684e View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#15553 - Veykril:metrics-hyper, r=Veykril

    Add hyper-0.14.18 to metrics
    
    should give us a bit of async stuff
    bors committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    2df30e1 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2023

  1. Update notify to 6.1.1

    Unlike version 6.0.1, this does not pull windows-sys 0.4.5 as observed in rust-lang#15077.
    
    $ cargo tree --target=x86_64-pc-windows-gnu --charset=ascii | grep windows-sys
    
    |           |   `-- windows-sys v0.42.0
    |   |   |   |   |   |       `-- windows-sys v0.42.0 (*)
    |       `-- windows-sys v0.48.0
        |   |   `-- windows-sys v0.48.0 (*)
        |   `-- windows-sys v0.48.0 (*)
    |   `-- windows-sys v0.48.0 (*)
    |   `-- windows-sys v0.42.0 (*)
    gigaroby committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    4f22e1a View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2023

  1. Parse builtin# syntax

    Veykril committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    9b8eb80 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1504830 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3431d58 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#15557 - Veykril:builtin-syntax, r=Veykril

    Parse builtin# syntax and add typechecking for builtin#offset_of expression
    
    Also removes box syntax, fixes rust-lang/rust-analyzer#14504
    
    cc rust-lang/compiler-team#580 rust-lang/rust-analyzer#15082
    bors committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    caeea45 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b1b044f View commit details
    Browse the repository at this point in the history
  6. fix lints

    davidbarsky committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    1ee7f54 View commit details
    Browse the repository at this point in the history
  7. fix some more lints

    davidbarsky committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    68781ae View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    abe8f1e View commit details
    Browse the repository at this point in the history
  9. fmt

    davidbarsky committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    6260c63 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#15556 - gigaroby:master, r=lnicola

    Update notify to 6.1.1
    
    Unlike version 6.0.1, this does not pull windows-sys 0.45.0 as observed in rust-lang#15077.
    
    ```
    $ cargo tree --target=x86_64-pc-windows-gnu --charset=ascii | grep windows-sys
    
    |           |   `-- windows-sys v0.42.0
    |   |   |   |   |   |       `-- windows-sys v0.42.0 (*)
    |       `-- windows-sys v0.48.0
        |   |   `-- windows-sys v0.48.0 (*)
        |   `-- windows-sys v0.48.0 (*)
    |   `-- windows-sys v0.48.0 (*)
    |   `-- windows-sys v0.42.0 (*)
    ```
    bors committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    b9a9722 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2023

  1. Desugar builtin#format_args

    Veykril committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    e243a03 View commit details
    Browse the repository at this point in the history
  2. Remove todo!()s

    Veykril committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    5fdd1e3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c0e4026 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3fa0bf0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5046889 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    96f1923 View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#15559 - Veykril:builtin-format-args, r=Veykril

    Implement builtin#format_args, using rustc's format_args parser
    
    `format_args!` now expands to `builtin#format_args(template, args...)`, the actual expansion now instead happens in lowering where we desugar this expression by using lang paths.
    
    As a bonus, we no longer need to evaluate `format_args` as an eager macro which means less macro expansions overall -> less cache thrashing!
    
    Fixes rust-lang/rust-analyzer#15082
    bors committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    f29867b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    42f77f8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f13b184 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#15564 - davidbarsky:davidbarsky/use-current-s…

    …ubcrates-rustfmt-toml-with-custom-command, r=Veykril
    
    internal: use current folder's `rustfmt.toml` with all rustfmt configurations
    
    ## Introduction
    
    Resolves rust-lang/rust-analyzer#15540. I moved the `chdir` functionality outside of the `match` to ensure that this functionality wouldn’t fall through again. As part of this PR, I also changed `from_proto::file_range` to accept a `TextDocumentIdentifier` by reference instead of by value, but I can undo this change if desired.
    
    ## Testing
    
    I added a `rustfmt.toml` will the contents below at `crates/rust-analyzer/rustfmt.toml`:

    
    ```toml
    reorder_modules = false
    use_small_heuristics = "Max"
    # this is the only difference from the `rustfmt.toml` at the root of the repo
    tab_spaces = 8
    ```
    
    In addition, I've also added `"rust-analyzer.rustfmt.overrideCommand": ["rustfmt"]` to my VS Code configuration.
    
    With the above changes, saving `crates/rust-analyzer/src/handlers/request.rs` results in 8-space indentation. Meanwhile, saving `crates/toolchain/src/lib.rs` _does not_ result in any formatting changes.
    bors committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    a843e46 View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#15565 - Veykril:mir, r=Veykril

    Implement `write_via_move` intrinsic for mir-eval
    
    Required for getting `write!`ing to work again. we fail with an odd type mimsatch eval error after this change though
    bors committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    5906c26 View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#15532 - SomeoneToIgnore:more-brackets-on-type…

    …-formatting, r=Veykril
    
    On type format '(', by adding closing ')' automatically
    
    If I understand right, `()` can surround pretty much the same `{}` can, so add another on type formatting pair for convenience: sometimes it's not that pleasant to write parenthesis in `Some(2).map(|i| (i, i+1))` cases and I would prefer r-a to do that for me.
    
    One note: currently, https://github.com/rust-lang/rust-analyzer/blob/b06503b6ec98c9ed44698870cbf3302b8560b442/crates/rust-analyzer/src/handlers/request.rs#L357 fires always.
    Should we remove the assertion entirely now, since apparently things work in release despite that check?
    bors committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    77b359a View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e4c4693 View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#15567 - HKalbasi:mir, r=HKalbasi

    Ignore enum variants in analysis stats of mir bodies
    bors committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    d04cff6 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Configuration menu
    Copy the full SHA
    10b0cd7 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15568 - Veykril:upstream-rustc-ap, r=Veykril

    Replace format-args parser with upstream fork
    
    Turns out we can't bump rustc_abi right now because it got its generics removed accidentally rust-lang#107163
    bors committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    8edd81f View commit details
    Browse the repository at this point in the history
  3. project-model: when using rust-project.json, prefer the sysroot-def…

    …ined rustc over an env-based one
    davidbarsky committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    5b5bce8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cd53bd6 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#15571 - Veykril:mir-alloc, r=Veykril

    Remove allocation on mir eval memory write
    bors committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    d5b6ab2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    553152e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fad3823 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    912b22f View commit details
    Browse the repository at this point in the history
  9. Add assist into_to_qualified_from

    This assist converts an `.into()` call into an explicit
    fully qualified from call.
    alibektas committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    9762f76 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    506a477 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2023

  1. Auto merge of rust-lang#15574 - alibektas:15572/false_crate_name_env,…

    … r=Veykril
    
    minor : use crate name for `CARGO_CRATE_NAME`
    
    fixes rust-lang#15572 . Until now we used the package name as a replacement of crate name. With this PR r-a first sets all the env variables it set before and on top of those it tries to set `CARGO_CRATE_NAME` to crates name, following envvar's naming convention.
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    5ddad87 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15573 - alibektas:15539/into_to_from, r=Veykril

    assist : `into_to_qualified_from`
    
    fixes rust-lang#15539. This assist converts an `.into()` call into an explicit fully qualified `from()` call.
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    47e0d07 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#15558 - davidbarsky:davidbarsky/add-companion…

    …-extension-integration, r=Veykril
    
    code: remove `rust-analyzer.discoverProjectCommand` in favor of a companion extension
    
    I think it's time to remove this functionality from the `rust-analyzer` and move it into a dedicated extension responsible for this. Selfishly, this changes makes it tenable to do progress reporting to the editor and potentially do some more complicated things around managing _which_ workspaces are being used.
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    fac77a8 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#15430 - alibektas:deunwrap/wrap_return_type_i…

    …n_result, r=Veykril
    
    minor : Deunwrap wrap_return_type_in_result
    
    rust-lang#15398 subtask 7
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    3325622 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ca6ddd8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    853f8a2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e9e2c1a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fddef42 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9708a29 View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#15524 - vsrs:bind_unused_param, r=Veykril

    Bind unused parameter assistant
    
    This PR introduces a new **Bind unused parameter assistant**.
    
    While we do have a QuickFix from `rustc` (prefixing the parameter with an underscore), it's sometimes more convenient to suppress the warning using the following approach:
    ```rust
     fn some_function(unused: i32) {}
    ```
    ->
    ```rust
    fn some_function(unused: i32) {
        let _ = unused;
    }
    ```
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    829e777 View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#15575 - HKalbasi:mir, r=HKalbasi

    Intern projections in mir place
    
    I hope this reduces mir memory usage.
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    548d2f0 View commit details
    Browse the repository at this point in the history
  12. Auto merge of rust-lang#15529 - SomeoneToIgnore:less-inlay-hint-refre…

    …shes, r=Veykril
    
    Do not send inlay hint refresh requests on file edits
    
    See rust-lang/rust-analyzer#13369 (comment)
    
    Editor itself is able to invalidate hints after edits, and /refresh was sent after editor reports changes to the language server. This forces the editor to either query & invalidate the hints twice after every edit, or wait for /refresh to come before querying the hints.
    
    Both options are rather useless, so instead, send a request on server startup only: client editors do not know when the server actually starts up, this will help to query the initial hints after editor was open and the server was still starting up.
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    b67606c View commit details
    Browse the repository at this point in the history
  13. Auto merge of rust-lang#15528 - Veykril:r-a-cfg, r=Veykril

    Enable `rust_analyzer` for cfgs when code is being analyzed by rust-analyzer
    
    This allows one to have r-a skip analysis/replace macros that work not well with r-a at all by gating them behind this cfg (an example being the `quote` macro which r-a struggles with in terms of performance).
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    347695a View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#15522 - SomeoneToIgnore:resolve-inlay-hints, …

    …r=Veykril
    
    Resolve inlay hint data
    
    Part of rust-lang/rust-analyzer#13962
    
    Support https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#inlayHint_resolve better, by omitting all inlay hint fields specified in the client hint resolve capabilities.
    
    Current list of all capabilities possible to resolve later:
    ```
    "textEdits"
    "tooltip"
    "label.tooltip"
    "label.location"
    "label.command"
    ```
    
    and every one specified in the client capabilities is now resolved by r-a, being omitted in the initial response.
    
    --------------
    
    When editing `inlay_hints.rs` file around line `457` with no resolve capabilities, I get
    <details>
      <summary>resolved json, 10803 characters</summary>
    
    ```json
    {"jsonrpc":"2.0","id":55,"result":[{"position":{"line":477,"character":1},"label":[{"value":"fn inlay_hints","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/ide/src/inlay_hints.rs","range":{"start":{"line":445,"character":14},"end":{"line":445,"character":25}}}}],"paddingLeft":true,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":451,"character":10},"label":[{"value":": "},{"value":"ProfileSpan","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/profile/src/hprof.rs","range":{"start":{"line":85,"character":11},"end":{"line":85,"character":22}}}},{"value":""}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":451,"character":27},"label":[{"value":"label:","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/profile/src/hprof.rs","range":{"start":{"line":60,"character":12},"end":{"line":60,"character":17}}}}],"kind":2,"paddingLeft":false,"paddingRight":true,"data":{"file_id":0}},{"position":{"line":452,"character":12},"label":[{"value":": "},{"value":"Semantics","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/hir/src/semantics.rs","range":{"start":{"line":108,"character":11},"end":{"line":108,"character":20}}}},{"value":"<'_, "},{"value":"RootDatabase","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/ide-db/src/lib.rs","range":{"start":{"line":75,"character":11},"end":{"line":75,"character":23}}}},{"value":">"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":453,"character":12},"label":[{"value":": "},{"value":"SourceFile","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/syntax/src/ast/generated/nodes.rs","range":{"start":{"line":223,"character":11},"end":{"line":223,"character":21}}}},{"value":""}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":454,"character":12},"label":[{"value":": &"},{"value":"SyntaxNode","location":{"uri":"file:///Users/someonetoignore/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rowan-0.15.11/src/api.rs","range":{"start":{"line":15,"character":11},"end":{"line":15,"character":21}}}},{"value":"<"},{"value":"RustLanguage","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/syntax/src/syntax_node.rs","range":{"start":{"line":15,"character":9},"end":{"line":15,"character":21}}}},{"value":">"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":456,"character":12},"label":": i32","kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":458,"character":15},"label":[{"value":": "},{"value":"Vec","location":{"uri":"file:///Users/someonetoignore/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs","range":{"start":{"line":395,"character":11},"end":{"line":395,"character":14}}}},{"value":"<"},{"value":"InlayHint","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/ide/src/inlay_hints.rs","range":{"start":{"line":149,"character":11},"end":{"line":149,"character":20}}}},{"value":">"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":460,"character":21},"label":[{"value":": "},{"value":"SemanticsScope","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/hir/src/semantics.rs","range":{"start":{"line":1651,"character":11},"end":{"line":1651,"character":25}}}},{"value":"<'_>"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":460,"character":36},"label":[{"value":"node:","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/hir/src/semantics.rs","range":{"start":{"line":482,"character":24},"end":{"line":482,"character":28}}}}],"kind":2,"paddingLeft":false,"paddingRight":true,"data":{"file_id":0}},{"position":{"line":461,"character":23},"label":[{"value":": "},{"value":"FamousDefs","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/ide-db/src/famous_defs.rs","range":{"start":{"line":20,"character":11},"end":{"line":20,"character":21}}}},{"value":"<'_, '_>"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":463,"character":17},"label":[{"value":": impl FnMut("},{"value":"SyntaxNode","location":{"uri":"file:///Users/someonetoignore/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rowan-0.15.11/src/api.rs","range":{"start":{"line":15,"character":11},"end":{"line":15,"character":21}}}},{"value":"<"},{"value":"RustLanguage","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/syntax/src/syntax_node.rs","range":{"start":{"line":15,"character":9},"end":{"line":15,"character":21}}}},{"value":">)"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":463,"character":25},"label":[{"value":": "},{"value":"SyntaxNode","location":{"uri":"file:///Users/someonetoignore/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rowan-0.15.11/src/api.rs","range":{"start":{"line":15,"character":11},"end":{"line":15,"character":21}}}},{"value":"<"},{"value":"RustLanguage","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/syntax/src/syntax_node.rs","range":{"start":{"line":15,"character":9},"end":{"line":15,"character":21}}}},{"value":">"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":463,"character":33},"label":[{"value":"hints:","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/ide/src/inlay_hints.rs","range":{"start":{"line":480,"character":4},"end":{"line":480,"character":9}}}}],"kind":2,"paddingLeft":false,"paddingRight":true,"data":{"file_id":0}},{"position":{"line":465,"character":22},"label":[{"value":": "},{"value":"TextRange","location":{"uri":"file:///Users/someonetoignore/.cargo/registry/src/index.crates.io-6f17d22bba15001f/text-size-1.1.0/src/range.rs","range":{"start":{"line":14,"character":11},"end":{"line":14,"character":20}}}},{"value":""}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":467,"character":35},"label":[{"value":": "},{"value":"SyntaxNode","location":{"uri":"file:///Users/someonetoignore/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rowan-0.15.11/src/api.rs","range":{"start":{"line":15,"character":11},"end":{"line":15,"character":21}}}},{"value":"<"},{"value":"RustLanguage","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/syntax/src/syntax_node.rs","range":{"start":{"line":15,"character":9},"end":{"line":15,"character":21}}}},{"value":">"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":469,"character":92},"label":[{"value":"impl "},{"value":"Iterator","location":{"uri":"file:///Users/someonetoignore/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs","range":{"start":{"line":72,"character":10},"end":{"line":72,"character":18}}}},{"value":"<"},{"value":"Item","location":{"uri":"file:///Users/someonetoignore/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs","range":{"start":{"line":76,"character":9},"end":{"line":76,"character":13}}}},{"value":" = "},{"value":"SyntaxNode","location":{"uri":"file:///Users/someonetoignore/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rowan-0.15.11/src/api.rs","range":{"start":{"line":15,"character":11},"end":{"line":15,"character":21}}}},{"value":"<"},{"value":"RustLanguage","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/syntax/src/syntax_node.rs","range":{"start":{"line":15,"character":9},"end":{"line":15,"character":21}}}},{"value":">>"}],"kind":1,"paddingLeft":true,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":468,"character":34},"label":[{"value":"impl "},{"value":"Iterator","location":{"uri":"file:///Users/someonetoignore/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs","range":{"start":{"line":72,"character":10},"end":{"line":72,"character":18}}}},{"value":"<"},{"value":"Item","location":{"uri":"file:///Users/someonetoignore/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs","range":{"start":{"line":76,"character":9},"end":{"line":76,"character":13}}}},{"value":" = "},{"value":"SyntaxNode","location":{"uri":"file:///Users/someonetoignore/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rowan-0.15.11/src/api.rs","range":{"start":{"line":15,"character":11},"end":{"line":15,"character":21}}}},{"value":"<"},{"value":"RustLanguage","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/syntax/src/syntax_node.rs","range":{"start":{"line":15,"character":9},"end":{"line":15,"character":21}}}},{"value":">>"},{"value":""}],"kind":1,"paddingLeft":true,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":467,"character":41},"label":[{"value":""},{"value":"SyntaxNode","location":{"uri":"file:///Users/someonetoignore/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rowan-0.15.11/src/api.rs","range":{"start":{"line":15,"character":11},"end":{"line":15,"character":21}}}},{"value":"<"},{"value":"RustLanguage","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/syntax/src/syntax_node.rs","range":{"start":{"line":15,"character":9},"end":{"line":15,"character":21}}}},{"value":">"}],"kind":1,"paddingLeft":true,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":469,"character":40},"label":" -> bool","kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":469,"character":39},"label":[{"value":": &"},{"value":"SyntaxNode","location":{"uri":"file:///Users/someonetoignore/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rowan-0.15.11/src/api.rs","range":{"start":{"line":15,"character":11},"end":{"line":15,"character":21}}}},{"value":"<"},{"value":"RustLanguage","location":{"uri":"file:///Users/someonetoignore/work/rust-analyzer/crates/syntax/src/syntax_node.rs","range":{"start":{"line":15,"character":9},"end":{"line":15,"character":21}}}},{"value":">"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}}]}
    ```
    
    </details>
    
    for the visible editor range alone, pretty much repeated on every consequent edit.
    
    With this patch and all inlay hint resolve capabilities enabled, for the same example I observe quite a footprint reduction:
    
    <details>
      <summary>unresolved json, 4142 characters</summary>
    
    ```json
    {"jsonrpc":"2.0","id":49,"result":[{"position":{"line":477,"character":1},"label":[{"value":"fn inlay_hints"}],"paddingLeft":true,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":451,"character":10},"label":[{"value":": "},{"value":"ProfileSpan"},{"value":""}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":451,"character":27},"label":[{"value":"label:"}],"kind":2,"paddingLeft":false,"paddingRight":true,"data":{"file_id":0}},{"position":{"line":452,"character":12},"label":[{"value":": "},{"value":"Semantics"},{"value":"<'_, "},{"value":"RootDatabase"},{"value":">"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":453,"character":12},"label":[{"value":": "},{"value":"SourceFile"},{"value":""}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":454,"character":12},"label":[{"value":": &"},{"value":"SyntaxNode"},{"value":"<"},{"value":"RustLanguage"},{"value":">"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":456,"character":12},"label":": i32","kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":458,"character":15},"label":[{"value":": "},{"value":"Vec"},{"value":"<"},{"value":"InlayHint"},{"value":">"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":460,"character":21},"label":[{"value":": "},{"value":"SemanticsScope"},{"value":"<'_>"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":460,"character":36},"label":[{"value":"node:"}],"kind":2,"paddingLeft":false,"paddingRight":true,"data":{"file_id":0}},{"position":{"line":461,"character":23},"label":[{"value":": "},{"value":"FamousDefs"},{"value":"<'_, '_>"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":463,"character":17},"label":[{"value":": impl FnMut("},{"value":"SyntaxNode"},{"value":"<"},{"value":"RustLanguage"},{"value":">)"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":463,"character":25},"label":[{"value":": "},{"value":"SyntaxNode"},{"value":"<"},{"value":"RustLanguage"},{"value":">"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":463,"character":33},"label":[{"value":"hints:"}],"kind":2,"paddingLeft":false,"paddingRight":true,"data":{"file_id":0}},{"position":{"line":465,"character":22},"label":[{"value":": "},{"value":"TextRange"},{"value":""}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":467,"character":35},"label":[{"value":": "},{"value":"SyntaxNode"},{"value":"<"},{"value":"RustLanguage"},{"value":">"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":469,"character":92},"label":[{"value":"impl "},{"value":"Iterator"},{"value":"<"},{"value":"Item"},{"value":" = "},{"value":"SyntaxNode"},{"value":"<"},{"value":"RustLanguage"},{"value":">>"}],"kind":1,"paddingLeft":true,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":468,"character":34},"label":[{"value":"impl "},{"value":"Iterator"},{"value":"<"},{"value":"Item"},{"value":" = "},{"value":"SyntaxNode"},{"value":"<"},{"value":"RustLanguage"},{"value":">>"},{"value":""}],"kind":1,"paddingLeft":true,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":467,"character":41},"label":[{"value":""},{"value":"SyntaxNode"},{"value":"<"},{"value":"RustLanguage"},{"value":">"}],"kind":1,"paddingLeft":true,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":469,"character":40},"label":" -> bool","kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}},{"position":{"line":469,"character":39},"label":[{"value":": &"},{"value":"SyntaxNode"},{"value":"<"},{"value":"RustLanguage"},{"value":">"}],"kind":1,"paddingLeft":false,"paddingRight":false,"data":{"file_id":0}}]}
    ```
    
    </details>
    
    with all unresolved parts needing only for navigation, hover or applying the hint edit — dynamic parts that are made after mouse hover or similar events, that resolve the hint data.
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    70a6cf0 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    7e786ea View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    297ed70 View commit details
    Browse the repository at this point in the history
  17. Auto merge of rust-lang#15577 - Veykril:clear-native-diags, r=Veykril

    Clear native diagnostics on file closing
    
    Fixes rust-lang/rust-analyzer#15562
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    ea71a49 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    8654a09 View commit details
    Browse the repository at this point in the history
  19. Auto merge of rust-lang#15578 - Veykril:diag-tuple-struct-count, r=Ve…

    …ykril
    
    Diagnose mismatched arg count for tuple struct patterns
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    c31d418 View commit details
    Browse the repository at this point in the history
  20. Update crates/project-model/src/rustc_cfg.rs

    Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
    davidbarsky and Veykril committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    0bf6ffa View commit details
    Browse the repository at this point in the history
  21. Auto merge of rust-lang#15560 - davidbarsky:davidbarsky/use-sysroot-r…

    …ustc-to-determine-cfgs, r=Veykril
    
    project-model: when using `rust-project.json`, prefer the sysroot-defined rustc over discovery in `$PATH`
    
    At the moment, rust-analyzer discovers `rustc` via the `$PATH` even if the `sysroot` field is defined in a `rust-project.json`. However, this does not work for users who do not have rustup installed, resulting in any `cfg`-based inference in rust-analzyer not working correctly. In my (decently naive!) opinion, it makes more sense to rely on the `sysroot` field in the `rust-project.json`.
    
    One might ask "why not add `rustc` to the `$PATH`?" That is a reasonable question, but that doesn't work for my use case:
    - The path to the sysroot in my employer's monorepo changes depending on which platform a user is on. For example, if they're on Linux, they'd want to use the sysroot defined at path `a`, whereas if they're on macOS, they'd want to use the sysroot at path `b` (I wrote the sysroot resolution functionality [here](https://github.com/facebook/buck2/blob/765da4ca1e0b97a0de1e82b2fb3af52766fd06f4/integrations/rust-project/src/sysroot.rs#L39), if you're curious).
    - The location of the sysroot can (and does!) change, especially as people figure out how to make Rust run successfully on non-Linux platforms (e.g., iOS, Android, etc.) in a monorepo. Updating people's `$PATH` company-wide is hard while updating a config inside a CLI is pretty easy.
    
    ## Testing
    
    I've created a `rust-project.json` using [rust-project](https://github.com/facebook/buck2/tree/main/integrations/rust-project) and was able to successfully load a project with and without the `sysroot`/`sysroot_src` fields—without those fields, rust-analyzer fell back to the `$PATH` based approach, as evidenced by `[DEBUG project_model::rustc_cfg] using rustc from env rustc="rustc"` showing up in the logs.
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    c405509 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    55c7545 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2023

  1. Configuration menu
    Copy the full SHA
    8f5fee4 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15584 - Veykril:diag-private-field-constructo…

    …r, r=Veykril
    
    Diagnose private fields in record constructor
    bors committed Sep 9, 2023
    Configuration menu
    Copy the full SHA
    a3cfb45 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cfcef69 View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#15586 - Veykril:shrink, r=Veykril

    shrink_to_fit body source map
    bors committed Sep 9, 2023
    Configuration menu
    Copy the full SHA
    994df3d View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2023

  1. Shrink some stuff

    Veykril committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    ccff704 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15592 - Veykril:shrink, r=Veykril

    Shrink some stuff
    bors committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    326f37e View commit details
    Browse the repository at this point in the history
  3. Deunwrap extract_function

    alibektas committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    35e0d80 View commit details
    Browse the repository at this point in the history
  4. v2

    alibektas committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    6f74604 View commit details
    Browse the repository at this point in the history
  5. v3

    alibektas committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    0f1673c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7ae70a0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    43edb51 View commit details
    Browse the repository at this point in the history
  8. v3

    alibektas committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    6dc7fa9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a0c8bee View commit details
    Browse the repository at this point in the history
  10. v4

    alibektas committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    0118741 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2023

  1. Auto merge of rust-lang#15232 - alibektas:14850, r=Veykril

    ide : Disallow renaming of non-local items
    
    fixes rust-lang#14850 . This makes me wonder , why stop at structs and not do the same for other ADTs? Would be happy to add them too if nothing speaks against it.
    bors committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    0e251ff View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15431 - alibektas:deunwrap/extract_function, …

    …r=Veykril
    
    minor : Deunwrap extract_function
    
    rust-lang#15398 subtask 5.
    bors committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    cc6c820 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cd0a89a View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2023

  1. Configuration menu
    Copy the full SHA
    affe5a7 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15601 - Veykril:diag-derive, r=Veykril

    fix: Temporarily skip decl check in derive expansions
    
    "Fixes rust-lang/rust-analyzer#15344"
    bors committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    15e1356 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2023

  1. Configuration menu
    Copy the full SHA
    712e67c View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15606 - Veykril:annotation-above-item-fi, r=V…

    …eykril
    
    fix: Fix lens location "above_whole_item" breaking lenses
    
    Fixes rust-lang/rust-analyzer#15602
    bors committed Sep 13, 2023
    Configuration menu
    Copy the full SHA
    089ae47 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a219dbd View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2023

  1. Configuration menu
    Copy the full SHA
    47c51b7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e63e323 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#15611 - Veykril:stability-import, r=Veykril

    Prefer stable paths over unstable ones in import path calculation
    
    Fixes rust-lang/rust-analyzer#15610
    bors committed Sep 14, 2023
    Configuration menu
    Copy the full SHA
    12e28c3 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2023

  1. Auto merge of rust-lang#15597 - rmehri01:fix_promote_local_field_shor…

    …thand, r=HKalbasi
    
    Field shorthand overwritten in promote local to const assist
    
    Currently, running `promote_local_to_const` on the following:
    
    ```rust
    struct Foo {
        bar: usize,
    }
    
    fn main() {
        let $0bar = 0;
        let foo = Foo { bar };
    }
    ```
    
    Results in:
    
    ```rust
    struct Foo {
        bar: usize,
    }
    
    fn main() {
        const BAR: usize = 0;
        let foo = Foo { BAR };
    }
    ```
    
    But instead should be something like:
    
    ```rust
    struct Foo {
        bar: usize,
    }
    
    fn main() {
        const BAR: usize = 0;
        let foo = Foo { bar: BAR };
    }
    ```
    bors committed Sep 16, 2023
    Configuration menu
    Copy the full SHA
    9d0ccf0 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2023

  1. regression test

    jDomantas committed Sep 17, 2023
    Configuration menu
    Copy the full SHA
    a77789e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a0c31b7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b3aba94 View commit details
    Browse the repository at this point in the history
  4. add layout test

    jDomantas committed Sep 17, 2023
    Configuration menu
    Copy the full SHA
    a961068 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#15625 - jDomantas:domantas/fix-15623, r=HKalbasi

    fix: Don't skip closure captures after let-else
    
    As I understand that `return` was left there by accident. It caused capture analysis to skip the rest of the block after a let-else, and then missed captures caused incorrect results in borrowck, closure hints, layout calculation, etc.
    
    Fixes rust-lang#15623
    
    I didn't understand why I using the example from rust-lang#15623 as-is doesn't work - I don't get the warnings unless I remove the `call_me()` call, even on the same commit as my own RA version which does show those warnings.
    bors committed Sep 17, 2023
    Configuration menu
    Copy the full SHA
    0566644 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2023

  1. Configuration menu
    Copy the full SHA
    d39b45a View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#15628 - lnicola:sync-from-rust, r=lnicola

    minor: Sync from downstream
    bors committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    258b15c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b18db7a View commit details
    Browse the repository at this point in the history