Chayim Refael Friedman
e9fc3b6f20
Correctly set infer_args = true
in more places
...
Previously this being incorrect wasn't a problem, it just meant we put an error type that then changed to infer type, so exactly what rustc does at the end. But now there is a diagnostic.
2025-04-24 09:16:13 +02:00
Lukas Wirth
dce59ad8fb
fix: Fix type argument mismatch incorrectly triggering on inferred trait args
2025-04-24 09:16:01 +02:00
Lukas Wirth
4a2eaddc77
refactor: Remove WherePredicateTypeTarget
2025-04-24 09:13:56 +02:00
Lukas Wirth
8fb2dcc947
Merge pull request #19676 from ChayimFriedman2/lifetimes
...
feat: Properly handle lifetimes when checking generic arguments len
2025-04-24 06:13:55 +00:00
Chayim Refael Friedman
adcf699ea3
Properly handle lifetimes when checking generic arguments len
...
And also, prepare for correct lowering of lifetime. We still don't handle most lifetimes correctly, but a bit more of the foundation to lifetime elision is now implemented.
2025-04-24 08:35:20 +03:00
Lukas Wirth
3d00e247dd
Merge pull request #19672 from Veykril/push-tqooypklusty
...
fix: Fix incorrect diagnostic for lifetime parameter count mismatch
2025-04-23 14:47:40 +00:00
Lukas Wirth
d3b6d88386
fix: Fix incorrect diagnostic for lifetime parameter count mismatch
2025-04-23 16:36:13 +02:00
Lukas Wirth
d351eb6662
Merge pull request #19670 from Veykril/push-owsrlsmlzttm
...
minor: Mark `incorrect_generics_len` diagnostic as experimental
2025-04-23 10:41:49 +00:00
Lukas Wirth
35063ee389
Mark incorrect_generics_len
diagnostic as experimental
2025-04-23 12:28:47 +02:00
Lukas Wirth
4e4aee41c9
Merge pull request #19647 from roife/fix-issue-19646
...
fix: panics in inlay hints that produce empty text edits for closure return types
2025-04-22 16:27:28 +00:00
roifewu
97fa2a73ea
fix: panics in inlay hints that produce empty text edits for closure return types
2025-04-23 00:01:35 +08:00
Lukas Wirth
1c68d83569
Merge pull request #19657 from ChayimFriedman2/better-offset-of
...
feat: Better support `offset_of!()`
2025-04-22 13:28:34 +00:00
Lukas Wirth
40d37b020e
Merge pull request #19661 from ChayimFriedman2/salsa-v20
...
internal: Upgrade to the next Salsa
2025-04-22 12:31:09 +00:00
Chayim Refael Friedman
6e4abf126e
Account for IngredientCache::get_or_create()
taking &Zalsa
and not &dyn Database
2025-04-22 15:20:07 +03:00
Chayim Refael Friedman
547c124c05
Fix variance
...
This one does need fixpoint.
2025-04-22 15:20:07 +03:00
Chayim Refael Friedman
57c019a3c5
Adapt for new cycle handling changing in Salsa
2025-04-22 15:20:05 +03:00
Chayim Refael Friedman
db72e2ff41
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
2bba385dda
Adjust for new Salsa not implementing Debug
by default
2025-04-22 15:19:35 +03:00
Chayim Refael Friedman
1d52d5d422
Depend on Salsa v0.20.0
2025-04-22 15:19:35 +03:00
Lukas Wirth
9632b386d1
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
7b8200ba8d
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
99ce53b1d7
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
669a30852b
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
2b4b483af1
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
a6b24f47c1
minor: Fix outdated comment in hir-ty/generics.rs
2025-04-22 13:15:56 +02:00
bors
7faa264651
Auto merge of #139960 - amandasystems:placeholder-ui-tests, r=lcnr
...
Add tests for two untested cases of placeholder relations
During work on #130227 , I discovered several situations not covered by any previously existing UI test. This commit introudces tests to cover that.
r? lcnr
2025-04-22 11:05:54 +00:00
Lukas Wirth
9a9f4e7f63
Merge pull request #19624 from jackh726/chalk-update
...
Update chalk
2025-04-22 10:58:31 +00:00
bors
4106a7450c
Auto merge of #139897 - nnethercote:rm-OpenDelim-CloseDelim, r=petrochenkov
...
Remove `token::{Open,Close}Delim`
By replacing them with `{Open,Close}{Param,Brace,Bracket,Invisible}`.
PR #137902 made `ast::TokenKind` more like `lexer::TokenKind` by
replacing the compound `BinOp{,Eq}(BinOpToken)` variants with fieldless
variants `Plus`, `Minus`, `Star`, etc. This commit does a similar thing
with delimiters. It also makes `ast::TokenKind` more similar to
`parser::TokenType`.
This requires a few new methods:
- `TokenKind::is_{,open_,close_}delim()` replace various kinds of
pattern matches.
- `Delimiter::as_{open,close}_token_kind` are used to convert
`Delimiter` values to `TokenKind`.
Despite these additions, it's a net reduction in lines of code. This is
because e.g. `token::OpenParen` is so much shorter than
`token::OpenDelim(Delimiter::Parenthesis)` that many multi-line forms
reduce to single line forms. And many places where the number of lines
doesn't change are still easier to read, just because the names are
shorter, e.g.:
```
- } else if self.token != token::CloseDelim(Delimiter::Brace) {
+ } else if self.token != token::CloseBrace {
```
r? `@petrochenkov`
2025-04-22 01:15:06 +00:00
Chayim Refael Friedman
8d824c7828
Resolve offset_of!()
in IDE
2025-04-22 00:33:06 +03:00
Lukas Wirth
31dbec70c6
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
cb6ddbedb0
refactor: Fold hygiene map into bindings themselves
...
`HygieneId` fits into `Binding`'s padding.
2025-04-21 16:53:06 +02:00
Lukas Wirth
34e7d60e30
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
a5540bd98d
Merge pull request #19604 from WtzLAS/fix-issue-19601
...
Add semicolon to use
2025-04-21 12:34:07 +00:00
Lukas Wirth
00887db152
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
e3f7d18458
Merge pull request #19643 from ChayimFriedman2/generic-const-items
...
feat: Parse generic consts
2025-04-21 12:17:08 +00:00
bors
79074b7885
Auto merge of #139727 - rust-lang:cargo_update, r=Mark-Simulacrum
...
Weekly `cargo update`
Automation to keep dependencies in `Cargo.lock` current.
The following is the output from `cargo update`:
```txt
compiler & tools dependencies:
Locking 11 packages to latest compatible versions
Updating bstr v1.11.3 -> v1.12.0
Updating clap v4.5.35 -> v4.5.36
Updating clap_builder v4.5.35 -> v4.5.36
Updating crossbeam-channel v0.5.14 -> v0.5.15
Updating jiff v0.2.5 -> v0.2.6
Updating jiff-static v0.2.5 -> v0.2.6
Updating jsonpath-rust v1.0.0 -> v1.0.1
Updating linux-raw-sys v0.9.3 -> v0.9.4
Updating miniz_oxide v0.8.7 -> v0.8.8
Updating self_cell v1.1.0 -> v1.2.0
Updating winnow v0.7.4 -> v0.7.6
note: pass `--verbose` to see 38 unchanged dependencies behind latest
library dependencies:
Locking 1 package to latest compatible version
Updating miniz_oxide v0.8.7 -> v0.8.8
note: pass `--verbose` to see 4 unchanged dependencies behind latest
rustbook dependencies:
Locking 9 packages to latest compatible versions
Updating bstr v1.11.3 -> v1.12.0
Updating cc v1.2.18 -> v1.2.19
Updating clap v4.5.35 -> v4.5.36
Updating clap_builder v4.5.35 -> v4.5.36
Updating jiff v0.2.5 -> v0.2.6
Updating jiff-static v0.2.5 -> v0.2.6
Updating linux-raw-sys v0.9.3 -> v0.9.4
Updating miniz_oxide v0.8.7 -> v0.8.8
Updating winnow v0.7.4 -> v0.7.6
```
2025-04-21 12:07:02 +00:00
Lukas Wirth
5195f9d176
Merge pull request #19653 from Veykril/push-lmrprywtztzt
...
feat: parse `super let`
2025-04-21 11:58:36 +00:00
Lukas Wirth
5004778384
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
61635c762d
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
1b6948e88a
feat: parse super let
2025-04-21 13:47:42 +02:00
roifewu
06cf9ca521
minor: simplify and enhance notable traits rendering
2025-04-21 19:03:35 +08:00
Lukas Wirth
05b374acd4
feat: Allow unsetting env vars in server.extraEnv
config
2025-04-21 10:38:54 +02:00
Lukas Wirth
c673dc832d
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
d16b862ea5
fix: Support unstable UnsafePinned
struct in type layout calc
2025-04-21 09:35:30 +02:00
Lukas Wirth
66e3b5819e
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
5680911972
fix: Fix completion_snippets_custom config always erroring
2025-04-21 08:18:11 +02:00
Lukas Wirth
af301a88ec
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
db6db2aacc
Allow wrapping builtin#offset_of
fields argument in parentheses
...
This is necessary to correctly handle nested fields (`foo.bar`), see the comments in the code for explanation.
2025-04-21 03:43:15 +03:00
Chayim Refael Friedman
0f325c7ff8
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
9477e46bec
Get rid of static predefined symbols
...
Make them all `const`.
2025-04-21 03:07:35 +03:00