35093 Commits

Author SHA1 Message Date
Chayim Refael Friedman
3e834add61 Support spans with proc macro servers from before the ast id changes
The only thing changed is the value of the fixup ast id, so we just swap it.
2025-06-12 16:08:48 +03:00
Lukas Wirth
17d848a1bb Fix tests 2025-06-12 14:01:46 +02:00
Lukas Wirth
d8a6aaef96 Return item tree query results by ref 2025-06-12 13:35:43 +02:00
Lukas Wirth
2448abdb55 Remove dead code 2025-06-12 13:35:43 +02:00
Lukas Wirth
23eef0c4ea Shrink ModItem by usize 2025-06-12 13:35:43 +02:00
bors
06a7b508ca Auto merge of #142127 - compiler-errors:nested-goals-certainty, r=lcnr
Apply nested goals certainty to `InspectGoals` for normalizes-to

...so that normalizes-to goals don't have `Certainty::Yes` even if they have nested goals which don't hold.

r? lcnr
2025-06-12 11:29:20 +00:00
Chayim Refael Friedman
8715e6f8ac
Merge pull request #19983 from ChayimFriedman2/proc-macro-eq
fix: Fix comparison of proc macros
2025-06-12 10:42:21 +00:00
Chayim Refael Friedman
4f54885901 Fix comparison of proc macros
Comparing the TypeId is not enough, they also contain data.
2025-06-12 13:31:55 +03:00
Lukas Wirth
83a7ecdead Remove AttrOwner 2025-06-12 12:09:41 +02:00
Lukas Wirth
f27268f319 Ditch the unnecessary smallvec 2025-06-12 11:27:55 +02:00
Lukas Wirth
8930c58d30 Coalesce item tree data maps 2025-06-12 11:21:26 +02:00
Lukas Wirth
80996dca35 AttrOwner needs no ModItem 2025-06-12 11:05:18 +02:00
Lukas Wirth
f3434f537f Remove FileItemTreeId 2025-06-12 10:25:06 +02:00
Lukas Wirth
e9f8ecab45 Remove ItemTreeId 2025-06-12 10:25:06 +02:00
Lukas Wirth
7011fd054f
Merge pull request #19981 from Veykril/push-tzzunsrqqunv
fix: Do not force descend into derives for goto IDE features
2025-06-12 07:48:49 +00:00
Lukas Wirth
dc81984b64
Merge pull request #19980 from Veykril/push-qsuttvtvtytr
`ItemTree`'s `ItemVisibilities` has no identity, so deduplicate
2025-06-12 07:44:57 +00:00
Lukas Wirth
c8cedae2f9 fix: Do not force descend into derives for goto IDE features
Doing so can cause us to duplicate navigation targets for the same ranges which breaks convenience features of some editors where go to def can trigger find all references
2025-06-12 09:37:45 +02:00
Lukas Wirth
13494f4cac ItemTree's ItemVisibilities has no identity, so deduplicate 2025-06-12 09:14:43 +02:00
Lukas Wirth
c15fc9a344
Merge pull request #19837 from ChayimFriedman2/stable-astid
Provide better incrementality when items are changed
2025-06-12 06:09:01 +00:00
Chayim Refael Friedman
9a1063f266 LRU ast id map
We can do that and it's pretty heavy.
2025-06-12 08:50:43 +03:00
Chayim Refael Friedman
09a66474a2 Ignore ast id hashes in typos check 2025-06-12 08:50:43 +03:00
Chayim Refael Friedman
0a1a78cb87 Remove most of the item tree
I'm joking, but now that the def map is the only thing that uses the item tree, we can remove a lot of things from it that aren't needed for the def map.
2025-06-12 08:50:43 +03:00
Chayim Refael Friedman
ed0b4506dd Avoid referring to the item tree except in the def map
Item tree IDs are very unstable (adding an item of a kind invalidates all following items of the same kind). Instead use ast ids, which, since the previous commit, are pretty stable.
2025-06-12 08:50:40 +03:00
Chayim Refael Friedman
4bcf03e28b Use stable AST IDs
Instead of simple numbering, we hash important bits, like the name of the item.

This will allow for much better incrementality, e.g. when you add an item. Currently, this invalidates the IDs of all following items, which invalidates pretty much everything.
2025-06-12 08:47:22 +03:00
Lukas Wirth
2095af26ad
Merge pull request #19942 from ChayimFriedman2/faux
fix: Fix completion with some attribute macros
2025-06-12 05:44:34 +00:00
Chayim Refael Friedman
18358d6fb6
Merge pull request #19979 from rust-lang/dependabot/npm_and_yarn/editors/code/brace-expansion-1.1.12
chore(deps-dev): bump brace-expansion from 1.1.11 to 1.1.12 in /editors/code
2025-06-12 05:34:17 +00:00
dependabot[bot]
b5bec2d3d2
chore(deps-dev): bump brace-expansion in /editors/code
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-11 21:01:40 +00:00
Chayim Refael Friedman
5b2c8bc9ae
Merge pull request #19975 from davidbarsky/davidbarsky/test-trait-solve-invalidation
hir-ty: test incremental trait solving
2025-06-11 19:49:05 +00:00
David Barsky
210c71eac5 hir-ty: test (the absence of) incremental trait solving 2025-06-11 12:12:58 -04:00
bors
a36110d805 Auto merge of #141763 - lcnr:fixme-gamer, r=BoxyUwU
`FIXME(-Znext-solver)` triage

r? `@BoxyUwU`
2025-06-11 11:47:05 +00:00
Lukas Wirth
f7b7db8b8c
Merge pull request #19973 from Veykril/push-ppltxvqvqmkk
fix: Hide dyn inlay hints for incomplete `impl`s
2025-06-11 10:01:01 +00:00
Lukas Wirth
4cf958cfd4 fix: Hide dyn inlay hints for incomplete impls 2025-06-11 11:49:44 +02:00
bors
c9d1d243aa Auto merge of #141942 - ShoyuVanilla:smir-repr, r=oli-obk
Implement representation options to smir

Resolves rust-lang/project-stable-mir#89
2025-06-11 07:45:07 +00:00
Lukas Wirth
5919f6db3a
Merge pull request #19970 from ChayimFriedman2/proc-macro-srv-minus
fix: Fix proc macro server handling of strings with minuses
2025-06-11 06:08:54 +00:00
bors
a57c7b145d Auto merge of #142090 - compiler-errors:perf-stable-root-var, r=lcnr
Make root vars more stable

Never resolve a ty/ct vid to a higher vid as its root. This should make the optimization in rust-lang/rust#141500 more "stable" when there are a lot of vars flying around.

r? `@ghost`
2025-06-11 03:34:30 +00:00
Chayim Refael Friedman
8ca5ad6bdd Fix proc macro server handling of strings with minuses
It used to decompose them thinking they were numbers.
2025-06-11 01:03:35 +03:00
bors
9656c84cc9 Auto merge of #142292 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2025-06-10 20:54:59 +00:00
bors
9ffd4d46f7 Auto merge of #141485 - dianqk:early_otherwise_branch_loop, r=oli-obk
mir-opt: Do not create storage marks in EarlyOtherwiseBranch

Fixes #141212.

The first commit add `StorageDead` by creating new indirect BB that makes CFG more complicated, but I think it's better to just not create storage marks.

r? mir-opt
2025-06-10 14:50:54 +00:00
Chayim Refael Friedman
9c3476d225
Merge pull request #19964 from Wilfred/fix_typos
[minor] Fix typos
2025-06-10 12:32:44 +00:00
Wilfred Hughes
e7ae13368b [minor] Fix typos 2025-06-10 13:22:03 +01:00
Lukas Wirth
f15267aaf4
Merge pull request #19963 from ChayimFriedman2/unsized-impl-items
fix: Do not error at impls for unsized types that do not include `where Self: Sized` items
2025-06-10 11:37:30 +00:00
Chayim Refael Friedman
6f4a6d4349 Do not error at impls for unsized types that do not include where Self: Sized items 2025-06-10 14:04:21 +03:00
bors
a6756f1c38 Auto merge of #141451 - lcnr:canonicalize-env-cache, r=compiler-errors
cache `param_env` canonicalization

BLocked on rust-lang/rust#141581
2025-06-10 10:42:35 +00:00
Ralf Jung
ebfd3a63ae
Merge pull request #4382 from RalfJung/dup
test_dup: ensure the FDs remain in sync even after dup'ing
2025-06-10 09:11:22 +00:00
bors
75b6950542 Auto merge of #142109 - weihanglo:update-cargo, r=weihanglo
Update cargo

18 commits in 64a12460708cf146e16cc61f28aba5dc2463bbb4..fc1518ef02b77327d70d4026b95ea719dd9b8c51
2025-05-30 18:25:08 +0000 to 2025-06-06 04:49:44 +0000
- fix: Make UI tests handle hyperlinks consistently (rust-lang/cargo#15640)
- Update "time out" to "timeout" (rust-lang/cargo#15637)
- fix(workspace): reload current manifest path member only (rust-lang/cargo#15633)
- Update dependencies (rust-lang/cargo#15635)
- fix(publish): Don't tell people to ctrl-c without knowing consequences  (rust-lang/cargo#15632)
- refactor: clean up `clippy::perf` lint warnings (rust-lang/cargo#15631)
- fix(package): Skip registry check if its not needed (rust-lang/cargo#15629)
- Add --offline for comp (rust-lang/cargo#15623)
- cargo-credential-libsecret: load libsecret only once (rust-lang/cargo#15295)
- test(publish): Improvements in prep for `-Zpackage-workspace` stabilization (rust-lang/cargo#15628)
- fix(package): Allow packaging of self-cycles with -Zpackage-workspace (rust-lang/cargo#15626)
- docs: clarify `--all-features` not available for all commmands (rust-lang/cargo#15572)
- Remove double reference in Shell::print_json (rust-lang/cargo#15460)
- fix(trim-paths): remap all paths to `build.build-dir` (rust-lang/cargo#15614)
- test(trim-paths): enable more tests for windows-msvc (rust-lang/cargo#15621)
- fix(fingerprint): explicit reason rather than "stale; unknown reason" (rust-lang/cargo#15617)
- Fix cargo add overwriting symlinked Cargo.toml files (rust-lang/cargo#15281)
- chore(deps): update alpine docker tag to v3.22 (rust-lang/cargo#15616)

r? ghost
2025-06-10 05:56:54 +00:00
bors
d9094b2583 Auto merge of #142250 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2025-06-10 01:52:18 +00:00
bors
c15c655f72 Auto merge of #138062 - LorrensP-2158466:miri-enable-float-nondet, r=RalfJung
Enable Non-determinism of float operations in Miri and change std tests

Links to [#4208](https://github.com/rust-lang/miri/issues/4208) and [#3555](https://github.com/rust-lang/miri/issues/3555) in Miri.

Non-determinism of floating point operations was disabled in rust-lang/rust#137594 because it breaks the tests and doc-tests in core/coretests and std. This PR enables some of them.

This pr includes the following changes:

- Enables the float non-determinism but with a lower relative error of 4ULP instead of 16ULP
- These operations now have a fixed output based on the C23 standard, except the pow operations, this is tracked in [#4286](https://github.com/rust-lang/miri/issues/4286#issue-3010677983)
- Changes tests that made incorrect assumptions about the operations, not to make that assumption anymore (from `assert_eq!` to `assert_approx_eq!`.
- Changed the doctests of the stdlib of these operations to compare against fixed constants instead of `f*::EPSILON`, which now succeed with Miri and `-Zmiri-many-seeds`
- Added a constant `APPROX_DELTA` in `std/tests/floats/f32.rs` which is used for approximation tests, but with a different value when run in Miri. This is to make these tests succeed.
- Added tests in the float tests of Miri to test the C23 behaviour.

Fixes https://github.com/rust-lang/miri/issues/4208
2025-06-09 21:21:58 +00:00
David Barsky
bf6d445810
Merge pull request #19930 from regexident/dyn-semantics-take-two
Make `Semantics<'db, DB>` support `Semantics<'db, dyn HirDatabase>`, take two
2025-06-09 18:18:49 +00:00
Ralf Jung
0c876108c3
Merge pull request #4376 from yoctocell/tb-interior-mut-flag
TB: Add flag to disable the more precise interior mutability tracking
2025-06-09 15:50:19 +00:00
Laurențiu Nicola
64bc6b2299
Merge pull request #19954 from lnicola/sync-from-rust
minor: Sync from downstream
2025-06-09 12:55:47 +00:00