34731 Commits

Author SHA1 Message Date
Stuart Cook
d3b976f68e
Rollup merge of #139550 - Urgau:rmeta-remap-path-scope, r=nnethercote
Fix `-Zremap-path-scope` rmeta handling

This PR fixes the conditional remapping (`-Zremap-path-scope`) of rmeta file paths ~~by using the `debuginfo` scope~~ by conditionally embedding the local path in addition to the remapped path.

Fixes https://github.com/rust-lang/rust/issues/139217
2025-05-06 16:28:38 +10:00
bors
712e178a6d Auto merge of #131160 - ismailarilik:handle-potential-query-instability-lint-for-rustc-middle, r=oli-obk
Handle `rustc_middle` cases of `rustc::potential_query_instability` lint

This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_middle/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_middle/src/lib.rs#L29) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors.

A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447

r? `@compiler-errors`
2025-05-06 01:36:23 +00:00
Chayim Refael Friedman
d30deb58fe
Merge pull request #19751 from VictorArcium/env-var-cargo-manifest-path
Support environment variable CARGO_MANIFEST_PATH.
2025-05-05 21:14:28 +00:00
Chayim Refael Friedman
1c7a94f37d Add a --num-threads to the prime-caches CLI command
And make it parallel by default (and remove the `--parallel` flag) to mirror the IDE cache priming.
2025-05-05 23:55:11 +03:00
Chayim Refael Friedman
27dc8ad21b Better manage parallel prime caches
To make best use of available cores, and don't waste time waiting for other tasks. See the comments in the code for explanation.
2025-05-05 23:54:34 +03:00
Victor
32e09de7c2 Support environment variable CARGO_MANIFEST_PATH. 2025-05-05 22:13:48 +02:00
bors
d6ad86fc43 Auto merge of #140664 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2025-05-05 19:14:42 +00:00
Deadbeef
9fce1dfac5 Implement RFC 3503: frontmatters
Supercedes #137193
2025-05-05 23:10:08 +08:00
Lukas Wirth
d7e977a8f1
Merge pull request #19750 from Veykril/push-zvvsopwxovrn
fix: Remove unnecessary token length check for macros in renaming
2025-05-05 15:06:16 +00:00
bors
676ac98bc7 Auto merge of #140651 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2025-05-05 15:00:09 +00:00
Lukas Wirth
46df704c89 fix: Remove unnecessary token length check for macros in renaming 2025-05-05 16:54:38 +02:00
Lukas Wirth
d40455fec0
Merge pull request #19749 from Veykril/push-tsxvxzzmlxpq
refactor: Remove unnecessary `AsAny` trait
2025-05-05 14:53:57 +00:00
Lukas Wirth
3ec5c52dd6
Merge pull request #19748 from Veykril/push-qvmtutwtonou
github: Direct users to discussions instead of issues for questions
2025-05-05 14:52:49 +00:00
Lukas Wirth
091b7b2465 refactor: Remove unnecessary AsAny trait 2025-05-05 16:42:17 +02:00
Lukas Wirth
f1af8df57b github: Direct users to discussions instead of issues for questions 2025-05-05 16:41:39 +02:00
Lukas Wirth
fa759f770a
Merge pull request #19434 from vishruth-thimmaiah/negatives_in_concat
fix: negative nums in `concat!` expansion
2025-05-05 14:05:52 +00:00
Vishruth-Thimmaiah
109d933736
fix: negative nums in concat! expansion 2025-05-05 19:00:24 +05:30
Lukas Wirth
fdfa707807
Merge pull request #19747 from Veykril/push-kqxvxrxozswr
fix: Fix `move_bounds` assists not working for lifetimes
2025-05-05 13:18:20 +00:00
Lukas Wirth
f9c83edf12 fix: Fix move_bounds assists not working for lifetimes 2025-05-05 15:07:36 +02:00
Lukas Wirth
aaefc26412
Merge pull request #19746 from Veykril/push-swvuyqwwplrt
fix: Fix proc-macro API creating malformed negative literals
2025-05-05 12:21:23 +00:00
Lukas Wirth
361a927a71 fix: Fix proc-macro API creating malformed negative literals 2025-05-05 14:10:42 +02:00
bors
5e850d851f Auto merge of #140453 - Zoxc:next-disambiguator, r=oli-obk
Remove global `next_disambiguator` state and handle it with a `DisambiguatorState` type

This removes `Definitions.next_disambiguator` as it doesn't guarantee deterministic def paths when `create_def` is called in parallel. Instead a new `DisambiguatorState` type is passed as a mutable reference to `create_def` to help create unique def paths. `create_def` calls with distinct  `DisambiguatorState` instances must ensure that that the def paths are unique without its help.

Anon associated types did rely on this global state for uniqueness and are changed to use (method they're defined in + their position in the method return type) as the `DefPathData` to ensure uniqueness. This also means that the method they're defined in appears in error messages, which is nicer.

`DefPathData::NestedStatic` is added to use for nested data inside statics instead of reusing `DefPathData::AnonConst` to avoid conflicts with those.

cc `@oli-obk`
2025-05-05 11:50:43 +00:00
Lukas Wirth
cb18ead726 minor: Add more proc-macro tests for parsing negative literals 2025-05-05 13:44:45 +02:00
Lukas Wirth
75af9ddb3f
Merge pull request #19745 from Veykril/push-rnqulnqvltro
minor: Add a mbe test for parsing negative literals
2025-05-05 10:21:54 +00:00
Lukas Wirth
9d1364b730 minor: Add a mbe test for parsing negative literals 2025-05-05 12:10:48 +02:00
Lukas Wirth
f898e3f524
Merge pull request #19740 from vishruth-thimmaiah/unwrap_path_type
feat: add an assist to unwrap a type with a generic arg
2025-05-05 09:37:14 +00:00
Vishruth-Thimmaiah
4771b84a75
feat: add an assist to unwrap a type with a generic arg
This assist unwraps a type into its generic type argument, ignoring
const and lifetime arguments
2025-05-05 13:22:02 +05:30
Lukas Wirth
b3e086ad10
Merge pull request #19707 from Veykril/push-kqkpzkymkyyl
refactor: De-arc defmap queries
2025-05-05 07:15:38 +00:00
Lukas Wirth
581646236e refactor: De-arc defmap queries 2025-05-05 09:04:52 +02:00
Lukas Wirth
b1bd478029
Merge pull request #19742 from Veykril/push-ykmuwtkzruqm
fix: Fix incorrect handling of unresolved non-module imports in name resolution
2025-05-05 06:41:34 +00:00
Lukas Wirth
9a62507f2e Fix incorrect handling of unresolved non-module imports in name resolution 2025-05-05 08:29:34 +02:00
Lukas Wirth
3b57c00151
Merge pull request #19739 from Veykril/push-kpozprqnsmkk
Disable fixpoint for variance computation temporarily
2025-05-05
2025-05-04 04:26:25 +00:00
Lukas Wirth
7d51ec376a Disable fixpoint for variance computation temporarily 2025-05-04 06:09:34 +02:00
Lukas Wirth
bfb717ac09
Merge pull request #19735 from A4-Tacks/improve-let-snippet
Improve the let code snippet
2025-05-04 04:06:56 +00:00
bors
1502c64b88 Auto merge of #140535 - dtolnay:hashbrown, r=tgross35
Update hashbrown dependency to unblock ExtractIf improvements

Release notes: https://github.com/rust-lang/hashbrown/releases/tag/v0.15.3

Relevant to me, this release includes https://github.com/rust-lang/hashbrown/pull/616 which unblocks https://github.com/rust-lang/rust/pull/139764.
2025-05-03 23:49:11 +00:00
bors
04c94e8d32 Auto merge of #140502 - nikic:llvm-20.1.4, r=dianqk
Update to LLVM 20.1.4

Fixes https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/Why.20is.20the.20compiler.20failing.20on.20below.20code.3F.
2025-05-03 17:03:37 +00:00
bors
707ec70aa2 Auto merge of #140464 - oli-obk:successors-mut-perf, r=petrochenkov
Use a closure instead of three chained iterators

Fixes the perf regression from #123948

That PR had chained a third option to the iterator which apparently didn't optimize well
2025-05-03 10:43:38 +00:00
A4-Tacks
850d122fd4
Improve let snippet 2025-05-03 17:04:11 +08:00
A4-Tacks
d922c20158
Improve the let code snippet 2025-05-03 13:15:32 +08:00
bors
9455557b97 Auto merge of #140442 - osiewicz:collector-walk-less-fine-grained-locking, r=wesleywiser
mono collector: Reduce # of locking while walking the graph

While profiling Zed's dev build I've noticed that while most of the time `upstream_monomorphizations` takes a lot of time in monomorpization_collector, in some cases (e.g. build of `editor` itself) the rest of monomorphization_collector_graph_walk dominates it. Most of the time is spent in collect_items_rec.

This PR aims to reduce the number of locks taking place; instead of locking output MonoItems once per children of current node, we do so once per *current node*. We also get to reuse locks for mentioned and used items. While this commit does not reduce Wall time of Zed's build, it does shave off CPU time (measured with `cargo build -j1`) from 48s to 47s. I've also tested it with parallel frontend against Zed and ripgrep and found no regressions.
2025-05-03 00:24:14 +00:00
Lukas Wirth
6f9c62dfec
Merge pull request #19733 from ShoyuVanilla/issue-19724
fix: Implement mut to const ptr cast for method resolution
2025-05-02 20:48:24 +00:00
Lukas Wirth
3bf5d7f7f9
Merge pull request #19732 from ShoyuVanilla/issue-19730
fix: Correct assoc ty bound var starting index
2025-05-02 20:46:54 +00:00
Shoyu Vanilla
4aa98bf1d7 fix: Implement mut to const ptr cast for method resolution 2025-05-03 03:01:40 +09:00
bors
473e234d69 Auto merge of #140406 - Urgau:autorefs-perf, r=nnethercote
perf: delay checking of `#[rustc_no_implicit_autorefs]` in autoref lint

Try to address the regression seen in https://github.com/rust-lang/rust/pull/123239#issuecomment-2835418470 by delaying the checking of `#[rustc_no_implicit_autorefs]` on method call.
2025-05-02 17:35:50 +00:00
Lukas Wirth
be7433328e
Merge pull request #19731 from Veykril/push-mmvowomkpwxy
refactor: Simplify macro call id construction
2025-05-02 15:38:17 +00:00
Shoyu Vanilla
9f60884db7 fix: Correct assoc ty bound var starting index 2025-05-03 00:31:33 +09:00
Lukas Wirth
5d43e752ad refactor: Simplify macro call id construction 2025-05-02 17:26:48 +02:00
Lukas Wirth
9625ef795d
Merge pull request #19581 from Veykril/push-uvyutolsqnun
Render more lifetimes
2025-05-02 12:47:03 +00:00
Lukas Wirth
235d88bf42 Render more lifetimes 2025-05-02 14:36:18 +02:00
bors
495a416076 Auto merge of #139883 - matthiaskrgr:crashesapr15, r=Mark-Simulacrum
crashes: more tests

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
try-job: test-various
2025-05-02 10:46:51 +00:00