about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-10-21fix: Fix token downmapping failing for include! inputsLukas Wirth-41/+125
2024-10-21Auto merge of #17954 - Noratrieb:rustc-blazing-hash, r=Veykrilbors-218/+227
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 https://github.com/rust-lang/rustc-hash/pull/37.
2024-10-21fix: FIx mbe bench tests being iteration order dependentLukas Wirth-5/+8
2024-10-21Update ide testsLukas Wirth-178/+179
2024-10-21Fix recursive_adt fixtureLukas Wirth-6/+8
2024-10-21Update rustc-hash to version 2Noratrieb-31/+34
This brings in the new optimized algorithm that was shown to have small performance benefits for rustc.
2024-10-20Auto merge of #18354 - roife:safe-kw-2, r=lnicolabors-11/+11
fix: classify `safe` as a contextual kw fix #18352
2024-10-21fix: classify `safe` as a contextual kwroife-11/+11
2024-10-20Auto merge of #18353 - ChayimFriedman2:cargo-lock, r=lnicolabors-5/+5
Update Cargo.lock
2024-10-20Update Cargo.lockChayim Refael Friedman-5/+5
2024-10-20Auto merge of #18350 - roife:safe-kw-1, r=lnicolabors-12/+326
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
2024-10-20fix: do not emit unsafe diagnositcs for safe statics in extern blocksroife-3/+62
2024-10-20feat: initial support for safe_kw in extern blocksroife-9/+264
2024-10-19Auto merge of #18336 - xuwaters:patch-1, r=lnicolabors-1/+1
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">
2024-10-19Auto merge of #18335 - SomeoneToIgnore:editorconfig-glob, r=lnicolabors-1/+1
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.)
2024-10-18Increase TOKEN_LIMIT for hir-expandWei Xu-1/+1
2024-10-19Fix editorconfig globKirill Bulatov-1/+1
2024-10-18Auto merge of #18300 - krobelus:clamp-position-character-2, r=Veykrilbors-3/+11
Clamp Position::character to line length 2/2 Completes https://github.com/rust-lang/rust-analyzer/pull/18243 I don't think I have permissions to target this on the other PR, so we'll need to rebase manually
2024-10-18Clamp Position::character to line lengthJohannes Altmanninger-3/+11
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 #18240
2024-10-18Auto merge of #18324 - davidbarsky:davidbarsky/fix-some-node-dependencies, ↵bors-138/+1401
r=lnicola vscode: update some dependencies I bumped Typescript and vsce; was a little tired of the warnings when running `vsce`.
2024-10-18vscode: update some dependenciesDavid Barsky-138/+1401
2024-10-18internal: fix lldb-dap unconditionally calling rustcDavid Barsky-0/+0
2024-10-18Auto merge of #18320 - davidbarsky:davidbarsky/fix-lldb-dap-calling-rustc, ↵bors-16/+27
r=Veykril internal: fix lldb-dap unconditionally calling rustc Fixes https://github.com/rust-lang/rust-analyzer/issues/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.
2024-10-18Auto merge of #18243 - krobelus:clamp-position-character, r=Veykrilbors-1/+32
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 #18240
2024-10-18Auto merge of #18331 - Veykril:veykril/push-tsolukqqyllz, r=Veykrilbors-1/+11
internal: Add more trivially `Sized` types to `is_sized` check
2024-10-18internal: Add more trivially `Sized` types to `is_sized` checkLukas Wirth-1/+11
2024-10-18Auto merge of #18328 - Veykril:veykril/push-zrzmmyqzqwyr, r=Veykrilbors-8/+13
fix: Fix CI running analysis-stats incorrectly against the standard libraries Fixes https://github.com/rust-lang/rust-analyzer/issues/18326
2024-10-18fix: Fix CI running analysis-stats incorrectly against the standard librariesLukas Wirth-8/+13
2024-10-17internal: fix lldb-dap unconditionally calling rustcDavid Barsky-16/+27
2024-10-17Auto merge of #18317 - lnicola:sync-from-rust, r=Veykrilbors-14121/+22801
minor: sync from downstream
2024-10-17Bump rustc cratesLaurențiu Nicola-19/+20
2024-10-17Merge from rust-lang/rustLaurențiu Nicola-14103/+22782
2024-10-17Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2024-10-17Auto merge of #18315 - varungandhi-src:vg/bump-scip, r=lnicolabors-7/+7
Bump version of scip crate Follow up to https://github.com/sourcegraph/scip/issues/284 Manually verified that SCIP generation works OK for rust-analyzer itself. cc `@RalfJung`
2024-10-17Bump version of scip crateVarun Gandhi-7/+7
2024-10-17Auto merge of #131796 - cuviper:no-waker-waker, r=Mark-Simulacrumbors-1/+0
Remove `Waker::waker` from 1.82 relnotes This was noticed in <https://github.com/rust-lang/blog.rust-lang.org/pull/1415#pullrequestreview-2371307666>.
2024-10-16Auto merge of #17990 - Wilfred:local_time_logs, r=Veykrilbors-1/+32
internal: Use local time when formatting logs When debugging rust-analyzer and looking at logs, it's much easier to read when the timestamp is in the local timezone. Before: 2024-08-28T20:55:38.792321Z INFO ParseQuery: invoked at R18460 After: 2024-08-28T13:55:38.792321-07:00 INFO ParseQuery: invoked at R18460
2024-10-16internal: Use local time when formatting logsWilfred Hughes-1/+32
When debugging rust-analyzer and looking at logs, it's much easier to read when the timestamp is in the local timezone. Before: 2024-08-28T20:55:38.792321Z INFO ParseQuery: invoked at R18460 After: 2024-08-28T13:55:38.792321-07:00 INFO ParseQuery: invoked at R18460
2024-10-16Auto merge of #131797 - matthiaskrgr:rollup-lzpze2k, r=matthiaskrgrbors-248/+610
Rollup of 9 pull requests Successful merges: - #130989 (Don't check unsize goal in MIR validation when opaques remain) - #131657 (Rustfmt `for<'a> async` correctly) - #131691 (Delay ambiguous intra-doc link resolution after `Cache` has been populated) - #131730 (Refactor some `core::fmt` macros) - #131751 (Rename `can_coerce` to `may_coerce`, and then structurally resolve correctly in the probe) - #131753 (Unify `secondary_span` and `swap_secondary_and_primary` args in `note_type_err`) - #131776 (Emscripten: Xfail backtrace ui tests) - #131777 (Fix trivially_copy_pass_by_ref in stable_mir) - #131778 (Fix needless_lifetimes in stable_mir) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-16Rollup merge of #131778 - practicalrs:fix_needless_lifetimes, r=jieyouxuMatthias Krüger-1/+1
Fix needless_lifetimes in stable_mir Hi, This PR fixes the following clippy warning ``` warning: the following explicit lifetimes could be elided: 'a --> compiler/stable_mir/src/mir/visit.rs:490:6 | 490 | impl<'a> PlaceRef<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 490 - impl<'a> PlaceRef<'a> { 490 + impl PlaceRef<'_> { | ``` Best regards, Michal
2024-10-16Rollup merge of #131777 - practicalrs:fix_trivially_copy_pass_by_ref, r=jieyouxuMatthias Krüger-3/+3
Fix trivially_copy_pass_by_ref in stable_mir Hi, This PR fixes the following clippy warnings ``` warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) --> compiler/stable_mir/src/mir/body.rs:1042:34 | 1042 | fn subslice_ty(ty: Ty, from: &u64, to: &u64, from_end: &bool) -> Result<Ty, Error> { | ^^^^ help: consider passing by value instead: `u64` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref = note: requested on the command line with `-W clippy::trivially-copy-pass-by-ref` warning: this argument (8 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) --> compiler/stable_mir/src/mir/body.rs:1042:44 | 1042 | fn subslice_ty(ty: Ty, from: &u64, to: &u64, from_end: &bool) -> Result<Ty, Error> { | ^^^^ help: consider passing by value instead: `u64` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref warning: this argument (1 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte) --> compiler/stable_mir/src/mir/body.rs:1042:60 | 1042 | fn subslice_ty(ty: Ty, from: &u64, to: &u64, from_end: &bool) -> Result<Ty, Error> { | ^^^^^ help: consider passing by value instead: `bool` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref ``` Best regards, Michal
2024-10-16Rollup merge of #131776 - hoodmane:emscripten-xfail-backtrace-tests, r=jieyouxuMatthias Krüger-0/+2
Emscripten: Xfail backtrace ui tests It is possible to link libunwind and use the normal backtrace code, but it fails to symbolize stack traces. I investigated and could get the list of instruction pointers and symbol names, but I'm not sure how to use the dwarf info to map from instruction pointer to source location. In any case, fixing this is not a high priority. See https://github.com/rust-lang/rust/issues/131738 r?jieyouxu
2024-10-16Rollup merge of #131753 - compiler-errors:swap-secondary, r=jieyouxuMatthias Krüger-22/+11
Unify `secondary_span` and `swap_secondary_and_primary` args in `note_type_err` Tiny tweak b/c working w `note_type_err` is kinda a mess.
2024-10-16Rollup merge of #131751 - compiler-errors:structurally-resolve, r=lcnrMatthias Krüger-57/+121
Rename `can_coerce` to `may_coerce`, and then structurally resolve correctly in the probe We need to structurally resolve the lhs and rhs of the coercion. Also, renaming the method so it's less ambiguous about what it's doing... the word "may" gives more clear signal that it has false positives imo. r? lcnr
2024-10-16Rollup merge of #131730 - zlfn:master, r=tgross35Matthias Krüger-76/+69
Refactor some `core::fmt` macros While looking at the macros in `core::fmt`, find that the macros are not well organized. So I created a patch to fix it. [`core/src/fmt/num.rs`](https://github.com/rust-lang/rust/blob/master/library/core/src/fmt/num.rs) * `impl_int!` and `impl_uint!` macro are **completly** same. It would be better to combine for readability * `impl_int!` has a problem that the indenting is not uniform. It has unified into 4 spaces * `debug` macro in `num` renamed to `impl_Debug`, And it was moved to a position close to the `impl_Display`. [`core/src/fmt/float.rs`](https://github.com/rust-lang/rust/blob/master/library/core/src/fmt/float.rs) [`core/src/fmt/nofloat.rs`](https://github.com/rust-lang/rust/blob/master/library/core/src/fmt/nofloat.rs) * `floating` macro now receive multiple idents at once. It makes the code cleaner. * Modified the panic message more clearly in fallback function of `cfg(no_fp_fmt_parse)`
2024-10-16Rollup merge of #131691 - GuillaumeGomez:intra-doc-link-filter-out-2, ↵Matthias Krüger-56/+351
r=notriddle Delay ambiguous intra-doc link resolution after `Cache` has been populated Fixes https://github.com/rust-lang/rust/issues/130233. I was getting nowhere with #130278. I took a wrong turn at some point and ended making way too many changes so instead I started again back from 0 and this time it worked out as expected. r? ```@notriddle```
2024-10-16Rollup merge of #131657 - compiler-errors:rustfmt-modifiers, r=ytmimiMatthias Krüger-23/+29
Rustfmt `for<'a> async` correctly In #127054, we decided to move the trait bound modifier for `async for<'a> Fn()` to `for<'a> async Fn()`. This wasn't adjusted in rustfmt, so this PR implements that. It also requires consolidating the bound formatting into the `Rewrite` impl for `PolyTraitRef`. Fixes #131649
2024-10-16Rollup merge of #130989 - compiler-errors:unsize-opaque, r=estebankMatthias Krüger-10/+23
Don't check unsize goal in MIR validation when opaques remain Similarly to `mir_assign_valid_types`, let's just skip when there are opaques. Fixes #130921.
2024-10-16Remove `Waker::waker` from 1.82 relnotesJosh Stone-1/+0
2024-10-16Auto merge of #131792 - matthiaskrgr:rollup-480nwg4, r=matthiaskrgrbors-560/+1254
Rollup of 8 pull requests Successful merges: - #130822 (Add `from_ref` and `from_mut` constructors to `core::ptr::NonNull`.) - #131381 (Implement edition 2024 match ergonomics restrictions) - #131594 (rustdoc: Rename "object safe" to "dyn compatible") - #131686 (Add fast-path when computing the default visibility) - #131699 (Try to improve error messages involving aliases in the solver) - #131757 (Ignore lint-non-snake-case-crate#proc_macro_ on targets without unwind) - #131783 (Fix explicit_iter_loop in rustc_serialize) - #131788 (Fix mismatched quotation mark) r? `@ghost` `@rustbot` modify labels: rollup