Commit graph

72 commits

Author SHA1 Message Date
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
mo8it
f4b1b4bb82 Use Sender instead of boxed closure in vfs 2024-08-09 23:40:32 +02:00
Lukas Wirth
1114de0c37 Move flycheck crate into rust-analyzer main crate 2024-08-08 13:06:39 +02:00
bors
7dd258a36d Auto merge of #17771 - Veykril:parallel-vfs-config, r=Veykril
internal: Load VFS config changes in parallel

Simple attempt to make some progress f or https://github.com/rust-lang/rust-analyzer/issues/17373
No clue if those atomic orderings are right, though I don't think they are really too relevant either.

A more complete fix would probably need to replace our `ProjectFolders` handling a bit.
2024-08-05 14:07:22 +00:00
Lukas Wirth
314f30167f Slightly optimize watch list in vfs 2024-08-05 15:56:23 +02:00
bors
9d99d39eaf Auto merge of #17799 - Veykril:syntax-bridge, r=Veykril
Split out syntax-bridge into a separate crate

This functionality is not really tied to mbe macros, so imo it has no place in that crate.
2024-08-05 12:31:45 +00:00
Lukas Wirth
cdee65f5ea Newtype ErasedFileAstId 2024-08-05 13:46:47 +02:00
Lukas Wirth
90803b16c1 Split out syntax-bridge into a separate crate 2024-08-05 13:45:00 +02:00
Lukas Wirth
07e6f9d918 internal: Load VFS config changes in parallel 2024-08-02 13:04:15 +02:00
Lukas Wirth
5ac2ad4eaf internal: Remove AbsPathBuf::TryFrom impl that checks too many things at once 2024-08-02 11:08:19 +02:00
David Barsky
2e582ad848 feature: move linked_projects discovery to the rust-analyzer server 2024-07-18 12:01:27 -04:00
Lukas Wirth
41451a26e9 Remove Name::to_smol_str 2024-07-16 12:43:58 +02:00
Lukas Wirth
1a20a0803f More symbol usage 2024-07-16 12:05:16 +02:00
Lukas Wirth
9ce066e6fa Use symbol in cfg 2024-07-16 10:41:42 +02:00
Lukas Wirth
7f8a54bbee Switch token trees to use Symbols 2024-07-16 10:11:59 +02:00
Lukas Wirth
311aaa5a79 Fix incorrect encoding of literals in the proc-macro-api on version 4 2024-07-15 14:51:01 +02:00
Lukas Wirth
6af77a624e Encode ident rawness and literal kind separately in tt::Leaf 2024-07-15 12:24:40 +02:00