Chayim Refael Friedman
f97d90f89e
Adjust for salsa::Id::from_u32() being unsafe
...
This impacts our manual `salsa::Id` wrappers. I refactored them a bit to improve safety.
2025-04-22 15:19:35 +03:00
Chayim Refael Friedman
f0fa096213
Adjust for new Salsa not implementing Debug by default
2025-04-22 15:19:35 +03:00
Chayim Refael Friedman
6f01c7f3d0
Depend on Salsa v0.20.0
2025-04-22 15:19:35 +03:00
Lukas Wirth
c4e8514de1
Merge pull request #19479 from ChayimFriedman2/generic-mismatch
...
feat: Add two new diagnostics: one for mismatch in generic arguments count, and another for mismatch in their kind
2025-04-22 12:06:28 +00:00
Chayim Refael Friedman
f16cefb606
The new diagnostic has found a bug lurking in minicore
...
It's cute, isn't it?
2025-04-22 14:55:43 +03:00
Chayim Refael Friedman
5e49ce92fe
Add two new diagnostics: one for mismatch in generic arguments count, and another for mismatch in their kind
...
Also known as E0747 and E0107.
And by the way, rewrite how we lower generic arguments and deduplicate it between paths and method calls. The new version is taken almost straight from rustc.
This commit also changes the binders of `generic_defaults()`, to only include the binders of the arguments up to (and not including) the current argument. This make it easier to handle it in the rewritten lowering of generic args. It's also how rustc does it.
2025-04-22 14:55:43 +03:00
Lukas Wirth
5db7548ad6
Merge pull request #19622 from A4-Tacks/raw-string-suffix
...
Fix ide-assists raw_string suffix fail
2025-04-22 11:43:17 +00:00
Lukas Wirth
e51e384fb0
Merge pull request #19662 from Veykril/push-lqqvmnonlwrx
...
minor: Fix outdated comment in hir-ty/generics.rs
2025-04-22 11:26:56 +00:00
Lukas Wirth
c1cad77ac6
minor: Fix outdated comment in hir-ty/generics.rs
2025-04-22 13:15:56 +02:00
Lukas Wirth
7735f18620
Merge pull request #19624 from jackh726/chalk-update
...
Update chalk
2025-04-22 10:58:31 +00:00
Lukas Wirth
4a5ec88596
Merge pull request #19655 from Veykril/push-kunlloxnyksr
...
refactor: Fold hygiene map into bindings themselves
2025-04-21 15:04:24 +00:00
Lukas Wirth
832f70fa1f
refactor: Fold hygiene map into bindings themselves
...
`HygieneId` fits into `Binding`'s padding.
2025-04-21 16:53:06 +02:00
Lukas Wirth
b6eb883b1f
Merge pull request #19644 from ChayimFriedman2/const-syms
...
internal: Make predefined symbols `const` instead of `static`
2025-04-21 12:34:59 +00:00
Lukas Wirth
d7ddec67f2
Merge pull request #19604 from WtzLAS/fix-issue-19601
...
Add semicolon to use
2025-04-21 12:34:07 +00:00
Lukas Wirth
af324f248c
Merge pull request #19629 from jyn514/unset-env
...
allow using `null` to unset an environment variable
2025-04-21 12:22:26 +00:00
Lukas Wirth
3fc93c0c27
Merge pull request #19643 from ChayimFriedman2/generic-const-items
...
feat: Parse generic consts
2025-04-21 12:17:08 +00:00
Lukas Wirth
3310726864
Merge pull request #19653 from Veykril/push-lmrprywtztzt
...
feat: parse `super let`
2025-04-21 11:58:36 +00:00
Lukas Wirth
ade6329dcd
Merge pull request #19651 from roife/enhance-notable-trait-render
...
minor: simplify and enhance notable traits rendering
2025-04-21 11:48:43 +00:00
Lukas Wirth
7ff957818c
Merge pull request #19634 from Veykril/push-mnpmxxrprymo
...
feat: Allow unsetting env vars in `server.extraEnv` config
2025-04-21 11:48:41 +00:00
Lukas Wirth
fb5d3c36cd
feat: parse super let
2025-04-21 13:47:42 +02:00
roifewu
d47fdc11fa
minor: simplify and enhance notable traits rendering
2025-04-21 19:03:35 +08:00
Lukas Wirth
c8527c4dc9
feat: Allow unsetting env vars in server.extraEnv config
2025-04-21 10:38:54 +02:00
Lukas Wirth
244713d43a
Merge pull request #19650 from Veykril/push-rkxrprnwqktr
...
fix: Support unstable `UnsafePinned` struct in type layout calc
2025-04-21 07:47:50 +00:00
Lukas Wirth
1b40188314
fix: Support unstable UnsafePinned struct in type layout calc
2025-04-21 09:35:30 +02:00
Lukas Wirth
8f80674dd6
Merge pull request #19636 from Veykril/push-wttkunmqyskm
...
fix: Fix completion_snippets_custom config always erroring
2025-04-21 06:28:45 +00:00
Lukas Wirth
5d12827099
fix: Fix completion_snippets_custom config always erroring
2025-04-21 08:18:11 +02:00
Lukas Wirth
c85f63d42e
Back out "When changing the config, do not emit an error if a field is missing"
...
This backs out commit 8497fc321cad420b923e15f600106f8e22324930.
2025-04-21 08:10:00 +02:00
Chayim Refael Friedman
3b2bb61dc8
Remove unnecessary predefined symbol clones
...
Now that they're const it's no longer needed.
Nothing manual was performed: only a regexp search of `sym::([\w][\w\d]*)\.clone\(\)` and replace by `sym::$1`.
2025-04-21 03:10:13 +03:00
Chayim Refael Friedman
b2908433fe
Get rid of static predefined symbols
...
Make them all `const`.
2025-04-21 03:07:35 +03:00
Chayim Refael Friedman
c9e272ea0a
Parse generic consts
...
A lang team experiment, https://github.com/rust-lang/rust/issues/113521 .
2025-04-21 02:11:56 +03:00
Chayim Refael Friedman
31c5918463
Merge pull request #19642 from ChayimFriedman2/fix-warn
...
fix: Two config code changes
2025-04-20 19:56:25 +00:00
Chayim Refael Friedman
7db3d21a8a
When changing the config, do not emit an error if a field is missing
2025-04-20 22:45:25 +03:00
Chayim Refael Friedman
d1108a7305
Remove unused macro arm
2025-04-20 22:37:02 +03:00
Chayim Refael Friedman
42de0a525b
Merge pull request #19639 from bbb651/doc-fix-dead-links
...
doc: Fix dead manual links
2025-04-20 18:39:53 +00:00
bbb651
3f0d075653
doc: Fix dead manual links
2025-04-20 20:28:52 +03:00
Chayim Refael Friedman
b2974ac9c1
Merge pull request #19638 from bbb651/doc-config-anchors
...
doc: Rework generated configuration to have anchors
2025-04-20 16:56:40 +00:00
bbb651
71a0f6180b
doc: Rework generated configuration to have anchors
...
Also first line of default code blocks being used as the language instead of json
and fixes a missing `json` language in a doc comment code block.
2025-04-20 19:29:54 +03:00
jackh726
3eb6485151
Update chalk
2025-04-20 16:20:08 +00:00
Chayim Refael Friedman
824d33dc7c
Merge pull request #19617 from ChayimFriedman2/more-actual
...
internal: Make `HirFileId`, `EditionedFileId` and macro files Salsa struct
2025-04-19 19:21:53 +00:00
Chayim Refael Friedman
5da9984040
Make HirFileId, EditionedFileId and macro files Salsa struct
...
And make more queries non-interned.
Also flip the default for queries, now the default is to not intern and to intern a query you need to say `invoke_interned`.
2025-04-19 22:10:52 +03:00
jyn
fdcc2faaa2
allow using null to unset an environment variable
...
this makes three changes:
- all callsites of `toolchain::command` are changed to use
`command(path, extra_env)`, instead of manually adding the env after
the fact.
- all `map<str, str>` are changed to `map<str, option<str>>`.
- `command` checks for None and calls `env_remove` if so.
this caught several places where environment variables weren't being
propagated:
- when running `rustc --print=target-libdir`
- when running `cargo rustc -- --print=target-spec-json`
- when running the custom DiscoverLinkedProjects config. I *think* this
is for use with non-cargo build systems, so I didn't change it.
2025-04-19 12:15:22 -04:00
Lukas Wirth
6adf7f3be0
Merge pull request #19628 from jyn514/warn-bad-config
...
don't ignore config values that fail to parse
2025-04-19 14:20:05 +00:00
jyn
10a7468360
don't ignore config values that fail to parse
...
previously, these would just silently be ignored. now they give a
warning such as:
```
invalid config values: /completion/snippets/custom: invalid type: null, expected a map; /cargo/extraEnv: invalid type: null, expected a string;
```
2025-04-19 10:08:05 -04:00
A4-Tacks
4869403d3a
Fix replace_string_with_char escaped char quote
2025-04-19 19:16:44 +08:00
Lukas Wirth
53bd63400f
Merge pull request #19613 from ChayimFriedman2/subst
...
fix: Fix a panic when a trait method in an impl declares a lifetime parameter not in the trait declaration
2025-04-18 18:51:14 +00:00
A4-Tacks
ad560d6890
Support ide-assists raw_string suffix
2025-04-18 22:06:22 +08:00
Laurențiu Nicola
968526f60d
Merge pull request #19618 from lnicola/pgo-revision
...
internal: Support specific revisions for PGO
2025-04-18 10:10:09 +00:00
Laurențiu Nicola
c777730005
Support specific revisions for pgo
2025-04-18 12:58:52 +03:00
Chayim Refael Friedman
69f3c33b88
Merge pull request #19619 from ChayimFriedman2/sort-notable
...
fix: Sort notable traits in hover
2025-04-18 09:56:45 +00:00
Chayim Refael Friedman
14c2933de2
Sort notable traits in hover
...
Previously it was ordered by what accidentally happened to be the crate graph order, which isn't sensible, plus it caused changes when any change was done to salsa IDs.
2025-04-18 12:45:22 +03:00