Commit graph

88 commits

Author SHA1 Message Date
Lukas Wirth
f57caa1cbb Bump proc-macro2 in xtask 2025-02-05 08:22:20 +01:00
Nathan Vegdahl
22b8339703 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
105ea3bc1d Use strict_provenance 2025-01-25 13:47:07 +01:00
Lukas Wirth
241fd2ff4d Properly record meaningful imports as re-exports in symbol index 2025-01-20 14:29:11 +01:00
Laurențiu Nicola
618b913663
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
5f4f6fb961 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
3af5c080e6 Bump rustc crates 2025-01-20 11:12:56 +02:00
Laurențiu Nicola
577a96a71f Bump windows-sys 2025-01-17 21:28:11 +02:00
Waffle Lapkin
fea252667d
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.
49b2257f66
Update notify to 8.0.0 2025-01-14 01:31:07 -06:00
Chayim Refael Friedman
acb3490b09 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
d4b53f5aab Decouple proc-macro server protocol from the server implementation 2024-12-30 10:33:57 +01:00
Laurențiu Nicola
0180d2d16f Bump rustc crates 2024-12-23 11:33:26 +02:00
Lukas Wirth
23e2f8aa86 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
f01874cbed Remove salsa from proc-macro server dep tree 2024-12-18 10:24:26 +01:00
Chayim Refael Friedman
2950325f37 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
884f57f9fc Bump rustc crates 2024-12-11 11:50:19 +02:00
Kirill Bulatov
1ce15606f2 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
cbc0069939 Draft completion hashing 2024-12-09 22:26:00 +02:00
Chayim Refael Friedman
63acf60253 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
1a435ed7ed Bump rustc crates 2024-11-28 08:39:56 +02:00
Laurențiu Nicola
9f4f903bcf Bump xshell 2024-11-16 18:02:44 +02:00
Laurențiu Nicola
7303227589 Bump rustc crates 2024-11-01 13:38:35 +02:00
bjorn3
3cc0ba8337 Remove support for compressed dylib metadata from rust-analyzer 2024-10-31 12:48:09 +00:00
Laurențiu Nicola
49baaf0b2d Bump rustc crates 2024-10-29 08:39:55 +02:00
Lukas Wirth
af764db2aa
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
c1551557c0 Move text-edit into ide-db 2024-10-28 14:37:41 +01:00
Chayim Refael Friedman
e970e07e10 Support cfg(true) and cfg(false)
As per RFC 3695.
2024-10-27 10:46:49 +02:00
Laurențiu Nicola
97eb4c7135 Bump smol_str 2024-10-24 10:08:31 +03:00
Chayim Refael Friedman
7ee25a0d70 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
efc2ba2d90 Replace some LayoutError variants with the rustc_abi errors 2024-10-22 10:19:25 +03:00
Noratrieb
657a925710 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
3bbf1b257f Update Cargo.lock 2024-10-20 18:50:05 +03:00
David Barsky
f01ebd6d13 vscode: update some dependencies 2024-10-18 08:43:14 -04:00
Laurențiu Nicola
6e4f8fea36 Bump rustc crates 2024-10-17 13:11:12 +02:00
Varun Gandhi
08a5dc491c Bump version of scip crate 2024-10-17 13:19:48 +08:00
Wilfred Hughes
929d5bcf77 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
9114a49050
Update cc to 1.1.22 2024-09-27 17:50:06 +00:00
Laurențiu Nicola
62aac8dd4f Bump rustc crates 2024-09-25 09:05:38 +03:00
Chayim Refael Friedman
288b365c59 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
5f8823bf8f Bump lsp-server 2024-09-06 14:06:38 +02:00
Lukas Wirth
775c5c84a5 fix: Don't panic lsp writer thread on dropped receiver 2024-09-06 09:13:00 +02:00
Lukas Wirth
7222f2de38 Parse builtin#asm expressions 2024-09-04 14:09:03 +02:00
Lukas Wirth
17e5f01d2b Bump smol_str 2024-09-03 11:54:33 +02:00
Lukas Wirth
01b7676fe7 internal: Lay basic ground work for standalone mbe tests 2024-09-01 12:42:44 +02:00
bors
b68992a510 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
642a0f84ca 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
4ea0db907c Bump rustc_pattern_analysis 2024-08-13 23:15:37 +09:00
bors
bdc0b7859f Auto merge of #17861 - Veykril:bump-lock, r=Veykril
minor: Bump lockfile
2024-08-12 11:05:08 +00:00
Lukas Wirth
69f613892a minor: Bump lockfile 2024-08-12 11:51:43 +02:00