1604 Commits

Author SHA1 Message Date
Laurențiu Nicola
9a3999698e Bump rustc crates 2025-02-10 07:52:04 +02:00
Lukas Wirth
4dc936bfe2 Bump proc-macro2 in xtask 2025-02-05 08:22:20 +01:00
Nathan Vegdahl
d6943d976d Update TentHash to version 1.0
The TentHash spec was frozen Jan 1st 2025, and release 1.0 of the Rust
crate is a minor cleanup as a follow-up to that, representing a
commitment to API stability as well.

The hash output remains the same as version 0.4, which rust-analyzer was
previously using. The only API change was a struct rename.
2025-01-29 12:07:20 +01:00
Lukas Wirth
090a145d44 Use strict_provenance 2025-01-25 13:47:07 +01:00
Lukas Wirth
51cc1a4614 Properly record meaningful imports as re-exports in symbol index 2025-01-20 14:29:11 +01:00
Laurențiu Nicola
46e2d6ec01
Merge pull request #18981 from Fabian-Gruenbichler/proc-macro-srv-portability
proc-macro-srv: make usage of RTLD_DEEPBIND portable
2025-01-20 09:35:11 +00:00
Fabian Grünbichler
73fc468a8f proc-macro-srv: make usage of RTLD_DEEPBIND portable
the constant is wrong on some platforms (e.g., on mips64el it's 0x10, and 0x8
is RTLD_NOLOAD which makes all this functionality broken), the libc crate takes
care of those differences for us.

fallback to not setting the flag in non-glibc environments - some of them might
have support for it using a different value that we don't know about, and some
of them lack it entirely.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2025-01-20 10:19:24 +01:00
Laurențiu Nicola
16d5c20225 Bump rustc crates 2025-01-20 11:12:56 +02:00
Laurențiu Nicola
d01fb4d45a Bump windows-sys 2025-01-17 21:28:11 +02:00
Waffle Lapkin
dde6ab4983
update chalk
this brings in support from trait upcasting, yay!
(and as such fixes a test)
2025-01-16 00:38:36 +01:00
Carson M.
297ce528f4
Update notify to 8.0.0 2025-01-14 01:31:07 -06:00
Chayim Refael Friedman
ceba289f80 Store token trees in contiguous Vec instead of as a tree
I expected this to be faster (due to less allocations and better cache locality), but benchmarked it is not (neither it is slower). Memory usage, however, drops by ~50mb (of `analysis-stats .`). I guess tt construction is just not hot.

This also simplifies using even less memory for token trees by compressing equal span, which I plan to do right after.

Some workflows are more easily expressed with a flat tt, while some are better expressed with a tree. With the right helpers, though (which was mostly a matter of trial and error), even the worst workflows become very easy indeed.
2025-01-02 19:21:46 +02:00
Lukas Wirth
714b81bec1 Decouple proc-macro server protocol from the server implementation 2024-12-30 10:33:57 +01:00
Laurențiu Nicola
31ff42d1cb Bump rustc crates 2024-12-23 11:33:26 +02:00
Lukas Wirth
5211972743 internal: Split serde derive feature into serde_derive usage
Ideally we'd not have any dependency pull in the derive feature for faster build times, once that is the case this change would have an actual effect.
See https://github.com/matklad/macro-dep-test/blob/master/README.md for context.
2024-12-20 11:55:02 +01:00
Lukas Wirth
3d63140758 Remove salsa from proc-macro server dep tree 2024-12-18 10:24:26 +01:00
Chayim Refael Friedman
0b7a6f38d7 Properly handle different defaults for severity of lints
Previously all lints were assumed to be `#[warn]`, and we had a hand-coded list of `#[allow]` exceptions. Now the severity is autogenerated from rustdoc output.

Also support lints that change status between editions, and the `warnings` lint group.
2024-12-11 20:48:41 +02:00
Laurențiu Nicola
c1433e9742 Bump rustc crates 2024-12-11 11:50:19 +02:00
Kirill Bulatov
4169926b3f Address the feedback from pascalkuthe
* Use Base64 to minify the hash representation in the JSON data
* Do hash checks only for items with similar labels
2024-12-10 13:01:23 +02:00
Kirill Bulatov
62d97d9ba7 Draft completion hashing 2024-12-09 22:26:00 +02:00
Chayim Refael Friedman
5f25ae3d1b Lay the foundation for diagnostics in ty lowering, and implement a first diagnostic
The diagnostic implemented is a simple one (E0109). It serves as a test for the new foundation.

This commit only implements diagnostics for type in bodies and body-carrying signatures; the next commit will include diagnostics in the rest of the things.

Also fix one weird bug that was detected when implementing this that caused `Fn::(A, B) -> C` (which is a valid, if bizarre, alternative syntax to `Fn(A, B) -> C` to lower incorrectly.

And also fix a maybe-bug where parentheses were sneaked into a code string needlessly; this was not detected until now because the parentheses were removed (by the make-AST family API), but with a change in this commit they are now inserted. So fix that too.
2024-12-04 14:22:56 +02:00
Laurențiu Nicola
d9df44fdc1 Bump rustc crates 2024-11-28 08:39:56 +02:00
Laurențiu Nicola
4d5a6c525d Bump xshell 2024-11-16 18:02:44 +02:00
Laurențiu Nicola
724f161cc9 Bump rustc crates 2024-11-01 13:38:35 +02:00
bjorn3
ad858841e7 Remove support for compressed dylib metadata from rust-analyzer 2024-10-31 12:48:09 +00:00
Laurențiu Nicola
ffdeb5dbb2 Bump rustc crates 2024-10-29 08:39:55 +02:00
Lukas Wirth
cf8f950baa
Merge pull request #18420 from ChayimFriedman2/cfg-true-false
feat: Support `cfg(true)` and `cfg(false)`
2024-10-28 13:56:41 +00:00
Lukas Wirth
64f56f458f Move text-edit into ide-db 2024-10-28 14:37:41 +01:00
Chayim Refael Friedman
074050c242 Support cfg(true) and cfg(false)
As per RFC 3695.
2024-10-27 10:46:49 +02:00
Laurențiu Nicola
0d3d8910a0 Bump smol_str 2024-10-24 10:08:31 +03:00
Chayim Refael Friedman
8adcbdcc49 Implement semitransparent hygiene
Or macro_rules hygiene, or mixed site hygiene. In other words, hygiene for variables and labels but not items.

The realization that made me implement this was that while "full" hygiene (aka. def site hygiene) is really hard for us to implement, and will likely involve intrusive changes and performance losses, since every `Name` will have to carry hygiene, mixed site hygiene is very local: it applies only to bodies, and we very well can save it in a side map with minor losses.

This fixes one diagnostic in r-a that was about `izip!()` using hygiene (yay!) but it introduces a huge number of others, because of #18262. Up until now this issue wasn't a major problem because it only affected few cases, but with hygiene identifiers referred by macros like that are not resolved at all. The next commit will fix that.
2024-10-22 21:26:56 +03:00
Laurențiu Nicola
a32039278f Replace some LayoutError variants with the rustc_abi errors 2024-10-22 10:19:25 +03:00
Noratrieb
6a2b8270c9 Update rustc-hash to version 2
This brings in the new optimized algorithm that was shown to have small performance benefits for
rustc.
2024-10-21 11:28:18 +02:00
Chayim Refael Friedman
a55a7b84a3 Update Cargo.lock 2024-10-20 18:50:05 +03:00
David Barsky
cfc5a0ea30 vscode: update some dependencies 2024-10-18 08:43:14 -04:00
Laurențiu Nicola
2fe603efe7 Bump rustc crates 2024-10-17 13:11:12 +02:00
Varun Gandhi
6db78a82d4 Bump version of scip crate 2024-10-17 13:19:48 +08:00
Wilfred Hughes
36b9f09917 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-16 15:22:57 -07:00
Chris Denton
c4103bdf59
Update cc to 1.1.22 2024-09-27 17:50:06 +00:00
Laurențiu Nicola
d0c3ef0ae4 Bump rustc crates 2024-09-25 09:05:38 +03:00
Chayim Refael Friedman
8a50aecb07 Support the ${concat(...)} metavariable expression
I didn't follow rustc precisely, because I think it does some things wrongly (or they are FIXME), but I only allowed more code, not less. So we're all fine.
2024-09-19 22:19:12 +03:00
Lukas Wirth
70ee4e5545 Bump lsp-server 2024-09-06 14:06:38 +02:00
Lukas Wirth
71a43aff4e fix: Don't panic lsp writer thread on dropped receiver 2024-09-06 09:13:00 +02:00
Lukas Wirth
86658c66b4 Parse builtin#asm expressions 2024-09-04 14:09:03 +02:00
Lukas Wirth
e517b84d98 Bump smol_str 2024-09-03 11:54:33 +02:00
Lukas Wirth
4502a602a7 internal: Lay basic ground work for standalone mbe tests 2024-09-01 12:42:44 +02:00
bors
fc36e0ca16 Auto merge of #17907 - ChayimFriedman2:no-once_cell, r=Veykril
internal: Replace once_cell with std's recently stabilized OnceCell/Lock and LazyCell/Lock

This doesn't get rid of the once_cell dependency, unfortunately, since we have dependencies that use it, but it's a nice to do cleanup. And when our deps will eventually get rid of once_cell we will get rid of it for free.
2024-08-16 07:05:59 +00:00
Chayim Refael Friedman
955e609867 Replace once_cell with std's recently stabilized OnceCell/Lock and LazyCell/Lock
This doesn't get rid of the once_cell dependency, unfortunately, since we have dependencies that use it, but it's a nice to do cleanup. And when our deps will eventually get rid of once_cell we will get rid of it for free.
2024-08-16 09:53:37 +03:00
Shoyu Vanilla
588fa2c6ef Bump rustc_pattern_analysis 2024-08-13 23:15:37 +09:00
bors
9817294eca Auto merge of #17861 - Veykril:bump-lock, r=Veykril
minor: Bump lockfile
2024-08-12 11:05:08 +00:00