Commit Graph

26058 Commits

Author SHA1 Message Date
David Barsky
b1b044f2d5 code: yeet rust-analyzer.discoverProjectCommand 2023-09-05 12:38:33 -04:00
bors
caeea45999 Auto merge of #15557 - Veykril:builtin-syntax, r=Veykril
Parse builtin# syntax and add typechecking for builtin#offset_of expression

Also removes box syntax, fixes https://github.com/rust-lang/rust-analyzer/issues/14504

cc https://github.com/rust-lang/compiler-team/issues/580 https://github.com/rust-lang/rust-analyzer/issues/15082
2023-09-05 12:10:31 +00:00
Lukas Wirth
3431d586e5 Insert builtin#asm into asm! expansion 2023-09-05 14:00:49 +02:00
Lukas Wirth
15048304e3 Implement offset_of in hir-def and hir-ty 2023-09-05 12:27:52 +02:00
Lukas Wirth
9b8eb807a3 Parse builtin# syntax 2023-09-05 10:36:35 +02:00
bors
2df30e1e07 Auto merge of #15553 - Veykril:metrics-hyper, r=Veykril
Add hyper-0.14.18 to metrics

should give us a bit of async stuff
2023-09-03 09:42:32 +00:00
Lukas Wirth
db4684ef6c Add hyper-0.14.18 to metrics 2023-09-03 11:39:29 +02:00
bors
63867dd477 Auto merge of #15552 - Veykril:metrics-new, r=Veykril
Bump `rustc-perf` checkout for metrics, replace webrender, diesel and ripgrep with newer versions

The previous versions were removed hence the updates. The metric results for the changed ones are disconnected now as to not muddle things up.

I think it's worth it for us to occasionally bump the `rustc-perf` checkout, as it allows us to include more interesting new targets.

Notably, the newer diesel is 3 times as fast to analyze as the one of the current checkout.
2023-09-03 08:34:45 +00:00
Lukas Wirth
f76f025889 Fix metrics CI to use new json file names 2023-09-03 10:34:32 +02:00
Lukas Wirth
520d02f561 Check that the bench path exists before invoking analysis-stats 2023-09-03 10:03:20 +02:00
Lukas Wirth
3a6196bf9e Bump rustc-perf, replace webrender and diesel with newer versions 2023-09-03 09:54:18 +02:00
bors
99686d56a8 Auto merge of #15551 - Veykril:docs, r=Veykril
Move doc comment handling into ide-db
2023-09-02 15:28:07 +00:00
Lukas Wirth
81f0108067 Remove markdown module from rust-analyzer crate 2023-09-02 17:27:52 +02:00
Lukas Wirth
8eddc64f86 Simplify 2023-09-02 17:12:57 +02:00
Lukas Wirth
b1575528c0 Move doc comment handling into ide-db 2023-09-02 16:27:26 +02:00
bors
0e002fe5c6 Auto merge of #15549 - Veykril:unwind-if-cancelled, r=Veykril
Add a few more `db.unwind_if_cancelled()` calls

Judging from a profile sent by a friend, the borrowck query took up a significant amount of time in their project which might be the cause for some unresponsiveness as nothing in the mir stack currently unwinds on cancellation
2023-09-02 12:40:44 +00:00
Lukas Wirth
0bf0563a00 Add a few more db.unwind_if_cancelled() calls 2023-09-02 14:39:19 +02:00
bors
8a29d0776f Auto merge of #15548 - Veykril:r-a-restructure, r=Veykril
Restructure some modules in rust-analyzer crate
2023-09-02 12:22:06 +00:00
Lukas Wirth
2dbc7e3e1a Restructure some modules in rust-analyzer crate 2023-09-02 14:16:04 +02:00
bors
2557995eaa Auto merge of #15546 - cuishuang:master, r=lnicola
remove the repetitive word
2023-09-02 07:11:34 +00:00
cui fliter
056b6b9416 remove the repetitive word
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-09-02 14:18:10 +08:00
bors
60182f7043 Auto merge of #15544 - Veykril:locks, r=Veykril
Shuffle some locking around

The main thread is still occasionally blocking on something and I am unsure what the cause might be. This will hopefully help somewhat
2023-09-01 19:55:03 +00:00
Lukas Wirth
c19390992c Reduce semantic token cache lock scopes 2023-09-01 21:54:29 +02:00
Lukas Wirth
cc8b78601d Shuffle some locking around 2023-09-01 20:45:46 +02:00
bors
074c66882f Auto merge of #15543 - Veykril:less-alloc, r=Veykril
Remove some allocations in borrowck
2023-09-01 18:28:42 +00:00
Lukas Wirth
70e21dc30b Remove some allocations in borrowck 2023-09-01 19:17:57 +02:00
bors
ce650ce19d Auto merge of #15542 - Veykril:std-once, r=Veykril
Less `once_cell` more `std`
2023-09-01 16:05:24 +00:00
Lukas Wirth
c09f175d59 Less once_cell more std 2023-09-01 17:30:59 +02:00
bors
321334429e Auto merge of #15534 - rust-lang:Veykril-patch-1, r=Veykril
Update architecture.md
2023-08-30 18:12:28 +00:00
Lukas Wirth
ea74cc4b9a
Update architecture.md 2023-08-30 19:53:47 +02:00
bors
b06503b6ec Auto merge of #15465 - Wilfred:command_handle_fixes, r=Veykril
Fix cargo handle logging in flycheck

This PR has two commits, so it's probably easier to review them separately:

(1) Rename `CargoHandle` to `CommandHandle`, as the command may not be a cargo command.

(2) Logging should format the current command, rather than calling `check_command()` again. This ensures that any later configuration changes don't cause us to log incorrect information.
2023-08-29 07:16:20 +00:00
bors
62268e474e Auto merge of #15527 - HKalbasi:diagnostics-allow, r=HKalbasi
Respect `#[allow(unused_braces)]`

fix #15526
2023-08-28 18:54:08 +00:00
hkalbasi
514fefab9c Respect #[allow(unused_braces)] 2023-08-28 22:22:28 +03:30
bors
144526c908 Auto merge of #15523 - lnicola:bootstrap, r=lnicola
internal: Fix release workflow
2023-08-28 07:24:24 +00:00
Laurențiu Nicola
a6f53567b0 Fix release workflow 2023-08-28 10:23:24 +03:00
Laurențiu Nicola
a0d27610ac Use env node to set RUSTC_BOOTSTRAP 2023-08-28 10:22:33 +03:00
bors
029baaad22 Auto merge of #15517 - xffxff:label_in_condition, r=lnicola
fix: diagnostics for 'while let' loop with label in condition

fix #15516
2023-08-26 17:02:57 +00:00
xffxff
204bc2cb60 fix: diagnostics for 'while let' loop with label in condition 2023-08-26 10:41:19 +08:00
bors
0a0bb777b1 Auto merge of #15512 - HKalbasi:mir, r=HKalbasi
Update offset intrinsic to match 1.72

fix #15498
2023-08-25 18:56:29 +00:00
hkalbasi
fa76f60cc1 Run cargo fmt on 1.72 2023-08-25 22:24:41 +03:30
hkalbasi
3864b43d28 Update offset intrinsic to match 1.72 2023-08-25 22:24:40 +03:30
Laurențiu Nicola
4e034d78de Set RUSTC_BOOTSTRAP=1 when running analysis-stats on libstd 2023-08-25 18:03:55 +03:00
bors
f5b7c60ff7 Auto merge of #15385 - inferiorhumanorgans:explicit-cross-target, r=Veykril
proc-macro-test: Pass target to cargo invocation

When cross compiling macos → dragonfly the dist build fails in the proc-maro-test-impl crate with the following error:

`ld: unknown option: -z\nclang: error: linker command failed with exit code 1 (use -v to see invocation)`

This appears to be a wart stemming from using an Apple host for cross compiling.  Passing the target along to cargo allows it to pick up a linker that it understands and DTRT.
2023-08-23 07:29:30 +00:00
bors
8b8c7d7ffd Auto merge of #15504 - lnicola:sync-from-rust, r=lnicola
minor: Sync from downstream
2023-08-23 07:07:37 +00:00
Laurențiu Nicola
a4b25034d6 Merge branch 'master' into sync-from-rust 2023-08-23 10:06:55 +03:00
bors
6444211205 Auto merge of #15503 - Wilfred:scip_version, r=Veykril
SCIP: Report the correct version of rust-analyzer in the metadata

Previously this was hard coded to "0.1". The SCIP protocol allows this to be an arbitrary string:

```
message ToolInfo {
  // Name of the indexer that produced this index.
  string name = 1;
  // Version of the indexer that produced this index.
  string version = 2;
  // Command-line arguments that were used to invoke this indexer.
  repeated string arguments = 3;
}
```

so use the same string reported by `rust-analyzer --version`.
2023-08-23 05:31:09 +00:00
Wilfred Hughes
bc42b9911d SCIP: Report the correct version of rust-analyzer in the metadata
Previously this was hard coded to "0.1". The SCIP protocol allows this
to be an arbitrary string:

```
message ToolInfo {
  // Name of the indexer that produced this index.
  string name = 1;
  // Version of the indexer that produced this index.
  string version = 2;
  // Command-line arguments that were used to invoke this indexer.
  repeated string arguments = 3;
}
```

so use the same string reported by `rust-analyzer --version`.
2023-08-22 18:51:39 -07:00
Michael Goulet
ce0eeee400 Rollup merge of #115011 - compiler-errors:warn-on-elided-assoc-ct-lt, r=cjgillot
Warn on elided lifetimes in associated constants (`ELIDED_LIFETIMES_IN_ASSOCIATED_CONSTANT`)

Elided lifetimes in associated constants (in impls) erroneously resolve to fresh lifetime parameters on the impl since #97313. This is not correct behavior (see #38831).

I originally opened #114716 to fix this, but given the time that has passed, the crater results seem pretty bad: https://github.com/rust-lang/rust/pull/114716#issuecomment-1682091952

This PR alternatively implements a lint against this behavior, and I'm hoping to bump this to deny in a few versions.
2023-08-22 09:00:49 -07:00
bors
9e3bf69ad3 Auto merge of #15499 - matklad:up-lsp-server, r=lnicola
internal: up lsp-server
2023-08-22 10:51:31 +00:00
Alex Kladov
43e868807e internal: up lsp-server 2023-08-22 11:42:53 +01:00