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

Subtree update of rust-analyzer #132029

Merged
merged 48 commits into from
Oct 22, 2024
Merged

Subtree update of rust-analyzer #132029

merged 48 commits into from
Oct 22, 2024

Commits on Oct 13, 2024

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

Commits on Oct 15, 2024

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

Commits on Oct 17, 2024

  1. Configuration menu
    Copy the full SHA
    7c2373e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    325d48f View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2024

  1. Configuration menu
    Copy the full SHA
    8df5f37 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#18328 - Veykril:veykril/push-zrzmmyqzqwyr, r=…

    …Veykril
    
    fix: Fix CI running analysis-stats incorrectly against the standard libraries
    
    Fixes rust-lang/rust-analyzer#18326
    bors committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    6b919c4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c9f2a0e View commit details
    Browse the repository at this point in the history
  4. Auto merge of rust-lang#18331 - Veykril:veykril/push-tsolukqqyllz, r=…

    …Veykril
    
    internal: Add more trivially `Sized` types to `is_sized` check
    bors committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    5b85f1c View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#18243 - krobelus:clamp-position-character, r=…

    …Veykril
    
    Clamp Position::character to line length
    
    LSP says about Position::character
    
    > If the character value is greater than the line length it defaults back to the line length.
    
    but from_proto::offset() doesn't implement this.
    
    A client might for example request code actions for a whole line by sending
    Position::character=99999.  I don't think there is ever a reason (besides laziness) why the
    client can't specify the line length instead but I guess we should not crash but follow protocol.
    
    Not sure how to update Cargo.lock (lib/README.md doesn't say how).
    
    Fixes rust-lang#18240
    bors committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    03cfa8e View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#18320 - davidbarsky:davidbarsky/fix-lldb-dap-…

    …calling-rustc, r=Veykril
    
    internal: fix lldb-dap unconditionally calling rustc
    
    Fixes rust-lang/rust-analyzer#18318. I also took the opportunity to refactor how `discoverSourceFileMap` worked—it now returns a type instead of mutating a map in place.
    
    I tested this change using the LLDB DAP extension. I needed to set `"lldb-dap.executable-path": "/Applications/Xcode.app/Contents/Developer/usr/bin/lldb-dap"` for everything to work, however, but once I did, was able to successfully debug a test.
    bors committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    4fc5172 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    db6824a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f01ebd6 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#18324 - davidbarsky:davidbarsky/fix-some-node…

    …-dependencies, r=lnicola
    
    vscode: update some dependencies
    
    I bumped Typescript and vsce; was a little tired of the warnings when running `vsce`.
    bors committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    8305c19 View commit details
    Browse the repository at this point in the history
  10. Clamp Position::character to line length

    LSP says about Position::character
    
    > If the character value is greater than the line length it defaults back to the line length.
    
    but from_proto::offset() doesn't implement this.
    
    A client might for example request code actions for a whole line by sending
    Position::character=99999.  I don't think there is ever a reason (besides laziness) why the
    client can't specify the line length instead but I guess we should not crash but follow protocol.
    
    Technically it should be a warning, not an error but warning is not shown by default so keep
    it at error I guess.
    
    Fixes rust-lang#18240
    krobelus committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    00318ba View commit details
    Browse the repository at this point in the history
  11. Auto merge of rust-lang#18300 - krobelus:clamp-position-character-2, …

    …r=Veykril
    
    Clamp Position::character to line length 2/2
    
    Completes rust-lang/rust-analyzer#18243
    
    I don't think I have permissions to target this on the other PR, so we'll need to rebase manually
    bors committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    0790356 View commit details
    Browse the repository at this point in the history
  12. Fix editorconfig glob

    SomeoneToIgnore committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    1a93651 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2024

  1. Configuration menu
    Copy the full SHA
    0590422 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#18335 - SomeoneToIgnore:editorconfig-glob, r=…

    …lnicola
    
    internal: Fix editorconfig glob
    
    Had been testing Zed's editorconfig branch on r-a and noticed that something was odd with yaml files.
    
    https://spec.editorconfig.org/#glob-expressions
    
    > {s1,s2,s3}
    
    > any of the strings given (separated by commas, can be nested) (But {s1} only matches {s1} literally.)
    bors committed Oct 19, 2024
    Configuration menu
    Copy the full SHA
    f075375 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#18336 - xuwaters:patch-1, r=lnicola

    Fix: Increase TOKEN_LIMIT in hir-expand
    
    Due to the `TOKEN_LIMIT`, rust-analyzer failed to expand macro for `web-sys::WebGl2RenderingContext` https://github.com/rustwasm/wasm-bindgen/blob/main/crates/web-sys/src/features/gen_WebGl2RenderingContext.rs
    
    <img width="780" alt="image" src="https://github.com/user-attachments/assets/3a39f18e-656e-43df-9994-0a0179fa42ac">
    <img width="403" alt="image" src="https://github.com/user-attachments/assets/7ae8dcf9-a40a-4070-8623-dd3a953bbf45">
    
    After increasing the `TOKEN_LIMIT`, the `web-sys::WebGl2RenderingContext` can be expanded successfully:
    <img width="459" alt="image" src="https://github.com/user-attachments/assets/76a71763-05a5-4f14-a5c9-61fc190c668f">
    bors committed Oct 19, 2024
    Configuration menu
    Copy the full SHA
    0c37404 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2372217 View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2024

  1. Configuration menu
    Copy the full SHA
    ccfc8e2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1b90ae4 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#18350 - roife:safe-kw-1, r=lnicola

    feat: initial support for safe_kw in extern blocks
    
    This PR adds initial support for `safe` keywords in external blocks.
    
    ## Changes
    
    1. Parsing static declarations with `safe` kw and `unsafe` kw, as well as functions with `safe` kw in extern_blocks
    2. Add `HAS_SAFE_KW ` to `FnFlags`
    3. Handle `safe` kw in `is_fn_unsafe_to_call` query
    4. Handle safe_kw in unsafe diagnostics
    bors committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    5f404f0 View commit details
    Browse the repository at this point in the history
  4. Update Cargo.lock

    ChayimFriedman2 committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    3bbf1b2 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#18353 - ChayimFriedman2:cargo-lock, r=lnicola

    Update Cargo.lock
    bors committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    d2c7e0f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8183f6b View commit details
    Browse the repository at this point in the history
  7. Auto merge of rust-lang#18354 - roife:safe-kw-2, r=lnicola

    fix: classify `safe` as a contextual kw
    
    fix rust-lang#18352
    bors committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    f21a01f View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. Configuration menu
    Copy the full SHA
    4dd2af5 View commit details
    Browse the repository at this point in the history
  2. Update rustc-hash to version 2

    This brings in the new optimized algorithm that was shown to have small performance benefits for
    rustc.
    Noratrieb authored and Veykril committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    657a925 View commit details
    Browse the repository at this point in the history
  3. Fix recursive_adt fixture

    Veykril committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    bbaeeb8 View commit details
    Browse the repository at this point in the history
  4. Update ide tests

    Veykril committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    e9da1dc View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2adc6c3 View commit details
    Browse the repository at this point in the history
  6. Auto merge of rust-lang#17954 - Noratrieb:rustc-blazing-hash, r=Veykril

    Update rustc-hash to version 2
    
    This brings in the new optimized algorithm that was shown to have small performance benefits for rustc. I haven't run the rust-analyzer benchmarks.
    
    See rust-lang/rustc-hash#37.
    bors committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    941c443 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8b4a94f View commit details
    Browse the repository at this point in the history
  8. Auto merge of rust-lang#18337 - dqkqd:issue-18287, r=Veykril

    fix: private items are shown in completions for modules in fn body
    
    Close: rust-lang#18287
    bors committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    a41e315 View commit details
    Browse the repository at this point in the history
  9. Auto merge of rust-lang#18294 - Giga-Bowser:master, r=Veykril

    Add wrap/unwrap return type in Option
    
    I pretty much just copied over the code and tests for wrapping/unwrapping return types in `Result` and then did a bunch of find and replace changes.
    
    I handled unwrapping statements returning `None` by just replacing `None` with the unit type, but I'm open to suggestions for more intuitive behavior here.
    bors committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    0d6202d View commit details
    Browse the repository at this point in the history
  10. Auto merge of rust-lang#18359 - Daanoz:support-initializeStopped, r=V…

    …eykril
    
    feat: support initializeStopped setting
    
    See rust-lang#18356
    
    Add option to start rust-analyzer in "stopped" state when the extension activates.
    bors committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    87f4dad View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e2dd95f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    ba3b7c7 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    ea03a06 View commit details
    Browse the repository at this point in the history
  14. Auto merge of rust-lang#18361 - Veykril:veykril/push-uzsokssoyznx, r=…

    …Veykril
    
    fix: Fix token downmapping failing for include! inputs
    
    Supercedes rust-lang/rust-analyzer#18325
    
    Fixes rust-lang/rust-analyzer#18325
    Fixes rust-lang/rust-analyzer#18313
    Fixes rust-lang/rust-analyzer#18314
    bors committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    20864ef View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    ad27b82 View commit details
    Browse the repository at this point in the history
  16. Auto merge of rust-lang#18360 - roife:safe-kw-3, r=Veykril

    feat: better completions for extern blcoks
    
    This PR refactors `add_keywords` (making it much clearer!) and enhances completion for `extern` blocks.
    
    It is recommended to reviewing the changes in order of the commits:
    
    - The first commit (f3c4dde0a4917a2bac98605cc045eecfb4d69872) doesn’t change any logic but refactors parts of the `add_keywords` function and adds detailed comments.
    - The second commit (5dcc1ab649bf8a49cadf006d620871b12f093a2f) improves completion for `extern` kw and extern blocks.
    bors committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    fa815a1 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2024

  1. Configuration menu
    Copy the full SHA
    5038ee7 View commit details
    Browse the repository at this point in the history
  2. Merge from rust-lang/rust

    lnicola committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    5d540f4 View commit details
    Browse the repository at this point in the history
  3. Bump rustc crates

    lnicola committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    420b665 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    efc2ba2 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#18364 - lnicola:sync-from-rust, r=lnicola

    minor: sync from downstream
    bors committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    ca51c1e View commit details
    Browse the repository at this point in the history