33438 Commits

Author SHA1 Message Date
jnyfah
7d1fedc4f3 minor changes 2025-02-07 10:50:45 +01:00
Lukas Wirth
ef05ca5d3b
Merge pull request #19106 from ShoyuVanilla/issue-18682
fix: Resolve projection types before checking casts
2025-02-07 08:13:12 +00:00
Lukas Wirth
29ccd5abdf
Merge pull request #19105 from darichey/fix-scip-builtin-occurrences
fix: Don't emit empty scip occurrence for builtins
2025-02-07 08:08:33 +00:00
Shoyu Vanilla
b7b4dd5afc fix: Resolve projection types before checking casts 2025-02-07 09:51:32 +09:00
David Richey
4d650702af fix: Don't emit empty scip occurrence for builtins 2025-02-06 12:22:58 -06:00
jnyfah
6b328750e5 collapsing if statement 2025-02-06 16:18:15 +01:00
jnyfah
4522bf42ca closure parameter inlay hints 2025-02-06 15:55:56 +01:00
bors
0df8beeb8b Auto merge of #136265 - notriddle:notriddle/clean-up, r=fmease
rustdoc: use ThinVec for generic arg parts

This reduces the size of both these args, and of path segments, so should measurably help with memory use.
2025-02-06 00:53:53 +00:00
bors
f37f4ffdf8 Auto merge of #136253 - notriddle:notriddle/aot-minify, r=GuillaumeGomez
rustdoc: run css and html minifier at build instead of runtime

This way, adding a bunch of comments to the JS files won't make rustdoc slower.

Meant to address https://github.com/rust-lang/rust/pull/136161#issuecomment-2622069453
2025-02-05 18:28:16 +00:00
bors
cec71bdfbd Auto merge of #136302 - oli-obk:push-vvqmwzunxsrk, r=compiler-errors
Avoid calling the layout_of query in lit_to_const

We got all the information available locally
2025-02-05 15:10:28 +00:00
Lukas Wirth
ca47cddc31
Merge pull request #19099 from Veykril/push-qxylslwltsqy
Use interior mutability for loaded `ProcMacrorv::expanders`
2025-02-05 11:17:21 +00:00
Lukas Wirth
5ec0057418 Use interior mutability for loaded ProcMacrorv::expanders 2025-02-05 12:01:57 +01:00
bors
0798e0305a Auto merge of #136094 - davidv1992:upgrade-elsa, r=oli-obk
Upgrade elsa to the newest version.

This was locked to 1.7.1 because of an error in the elsa release process that has since been fixed. Upgrading has the advantage that the elsa code runs properly in miri, at least with tree borrows.

This was spawned from https://github.com/rust-lang/rust/issues/135870#issuecomment-2612470540
2025-02-05 10:15:02 +00:00
Chayim Refael Friedman
549b49fdc8 Do not include excluded files even when the client opens them
This require a pretty big modification, because this is a new kind of file: exists - but ignore it.
2025-02-05 11:11:25 +02:00
Lukas Wirth
fc726ced6b
Merge pull request #18912 from vishruth-thimmaiah/fix_named_struct_assist
fix: upmap ranges in convert_tuple_struct_to_named_struct assist
2025-02-05 08:49:53 +00:00
Lukas Wirth
0e0dbd1497
Merge pull request #19097 from Veykril/push-xmkmkwplqnlr
Bump proc-macro2 in xtask
2025-02-05 07:38:35 +00:00
Lukas Wirth
4dc936bfe2 Bump proc-macro2 in xtask 2025-02-05 08:22:20 +01:00
Laurențiu Nicola
2ad4ec5b73
Merge pull request #19094 from ChayimFriedman2/use-body
fix: Fix IDE resolution of `use` inside a body
2025-02-05 07:16:35 +00:00
bors
b0d900a301 Auto merge of #136115 - Mark-Simulacrum:shard-alloc-id, r=RalfJung
Shard AllocMap Lock

This improves performance on many-seed parallel (-Zthreads=32) miri executions from managing to use ~8 cores to using 27-28 cores, which is about the same as what I see with the data structure proposed in https://github.com/rust-lang/rust/pull/136105 - I haven't analyzed but I suspect the sharding might actually work out better if we commonly insert "densely" since sharding would split the cache lines and the OnceVec packs locks close together. Of course, we could do something similar with the bitset lock too.

Either way, this seems like a very reasonable starting point that solves the problem ~equally well on what I can test locally.

r? `@RalfJung`
2025-02-04 23:47:45 +00:00
Chayim Refael Friedman
8ea61356a9 Remove a no-longer-correct FIXME 2025-02-04 23:07:48 +02:00
Chayim Refael Friedman
74591ecefe Fix incorrect terminology
Lifetimes are elided in function signatures, and inferred in bodies.
2025-02-04 23:07:35 +02:00
Chayim Refael Friedman
1432ab05d9 Refactor TyLoweringContext::substs_from_args_and_bindings() to always take a GenericDefId 2025-02-04 23:07:05 +02:00
Chayim Refael Friedman
6fb64beb80
Merge pull request #19095 from ChayimFriedman2/fixme-adt_const_params
minor: Add a FIXME for feature(adt_const_params)
2025-02-04 19:43:31 +00:00
Chayim Refael Friedman
9db2499bb9 Add a FIXME for feature(adt_const_params) 2025-02-04 21:28:19 +02:00
Chayim Refael Friedman
bffc169925 Fix a failing test
The reason this test passed previously is not because it was working as intended, but because prior to the previous commit we did not resolve the `use` at all!

Now, `use self as _` is invalid code anyway (it prints E0429), and because we fallback to the value namespace if we can't resolve in the type namespace (which is a reasonable behavior), this test now actually fails.

I don't think we want to change the fallback, so I removed `use self as _` and instead added a new test, where the value can be resolved in the type namespace.
2025-02-04 19:10:04 +02:00
Chayim Refael Friedman
134b6f2228 Fix IDE resolution of use inside a body
We stopped the expression search too early because `use` is an item.
2025-02-04 18:30:50 +02:00
Chayim Refael Friedman
ac6b054ca5 Make rust-analyzer.files.excludeDirs work, actually
I have no idea what the original writer of the code thought but the logic just seems backwards. We should not exclude a file/directory if it is equal to an include! This also meant that we had to add a `root == path` check so this stuff will actually work, which in turn meant excludes (of root files) no longer worked...

Also rename if to `rust-analyzer.files.exclude`, because it can exclude files as well.
2025-02-04 17:54:13 +02:00
Laurențiu Nicola
ed1d4092a7
Merge pull request #19083 from he32/fix-arm64-be
line-index: don't try to use (unavailable) neon on big-endian aarch64
2025-02-04 15:36:58 +00:00
Havard Eidnes
f4842d5803 line-index: don't try to use neon on big-endian aarch64. 2025-02-04 15:22:49 +00:00
Lukas Wirth
55e473abbf
Merge pull request #19093 from Veykril/push-lrvoookylnxp
Prevent panics from tearing down worker threads
2025-02-04 14:20:36 +00:00
Lukas Wirth
5ac4e9769c Prevent panics from tearing down worker threads 2025-02-04 15:03:35 +01:00
Lukas Wirth
0fd4fc3522
Merge pull request #19084 from Veykril/push-muworpzpzqup
Split cache priming into distinct phases
2025-02-04 13:57:39 +00:00
Lukas Wirth
ab5e821d97 Expose symbol of CrateName 2025-02-04 14:38:58 +01:00
bors
d730eff7c0 Auto merge of #135265 - pascaldekloe:fmt-int-speed, r=tgross35,ChrisDenton
Display of integers without raw pointers and without overflowing_literals

The benchmarks as is measure formatting speed of literals. The first commit `black_box`-es input to simulate runtime speed instead.

The second commit replaces `unsafe` pointer optimizations with plain array indices. The performance is equivalent on Apple M1. Needs peer review on Intel.

Happy to do the 128-bit version too if such change is welcome.
2025-02-04 09:15:53 +00:00
bors
96513a3741 Auto merge of #136146 - RalfJung:x86-abi, r=workingjubilee
Explicitly choose x86 softfloat/hardfloat ABI

Part of https://github.com/rust-lang/rust/pull/135408:
Instead of choosing this based on the target features listed in the target spec, make that choice explicit.
All built-in targets are being updated here; custom (JSON-defined) x86 (32bit and 64bit) softfloat targets need to explicitly set `rustc-abi` to `x86-softfloat`.
2025-02-03 20:02:54 +00:00
Lukas Wirth
13c17db07b
Merge pull request #19066 from alibektas/slice_pattern_type_inference
fix: try to infer array type from slice pattern
2025-02-03 14:03:50 +00:00
Lukas Wirth
cd0753a5ce
Merge pull request #19086 from Veykril/push-ponvylutpnww
fix: Fix some mir eval/lowerings
2025-02-03 13:58:34 +00:00
bors
514bb544c8 Auto merge of #136352 - lqd:ensure-stacks, r=compiler-errors
Add a couple of missing `ensure_sufficient_stacks`

r? `@saethlin` I hope you didn't spend time on this already.

(I couldn't sleep, opened `check_tail_calls`, there was a single call where it could happen, might as well fix it)

This PR adds a couple of missing `ensure_sufficient_stack`s:
- one in `check_tail_calls` that prevented the #135709 backport on some targets.
- after that was fixed, the test still didn't pass starting at 4MB, so I also added one in `check_unsafety` and that made it pass.

I didn't add an `rmake` test purposefully limiting the min stack size on `issue-74564-if-expr-stack-overflow.rs`, but we could if we wanted to.

On `apple-aarch64-darwin`, this is enough to make `RUST_MIN_STACK=$((1024*1024*3)) ./x test tests/ui --test-args tests/ui/issues/issue-74564-if-expr-stack-overflow.rs` pass for me locally, and it does stack overflow otherwise.
2025-02-03 13:56:04 +00:00
Lukas Wirth
d6645d11da Fix some mir eval/lowerings 2025-02-03 14:42:41 +01:00
Lukas Wirth
b3ff41ebe4
Merge pull request #19085 from Veykril/push-sknwykqmlott
Do not use make use of `InferenceResult::has_errors` flag for mir building
2025-02-03 12:43:14 +00:00
Lukas Wirth
465844c3be Do not use make use of InferenceResult::has_errors flag for mir building
It generaly does not work as expected right now as we fallback type parameters to errors
2025-02-03 12:26:06 +01:00
Ali Bektas
135fca9efe Revert tests::patterns::infer_pattern
And apply requested changes
2025-02-03 12:23:13 +01:00
Ali Bektas
94b00c210c Add a test to monitor whats going on 2025-02-03 12:14:13 +01:00
Ali Bektas
d8779b4a0e Make higher levels adapt Bodys exprs having ExprOrPatId values 2025-02-03 12:14:13 +01:00
Ali Bektas
06097c3388 Make Pat::Range's start and end Option<ExprId> 2025-02-03 12:14:11 +01:00
bors
9aa5dfb85e Auto merge of #136413 - EnzymeAD:fix-autodiff-comptime-regression, r=oli-obk
fix autodiff compile time regression

Tries to fix the regression from https://github.com/rust-lang/rust/pull/133429

Tracking:

- https://github.com/rust-lang/rust/issues/124509
2025-02-03 11:10:56 +00:00
Lukas Wirth
b7b09d2acb
Merge pull request #19062 from darichey/scip-fix-module-names
Fix scip indexing of module names
2025-02-03 10:05:19 +00:00
Lukas Wirth
b32ddea521 Split cache priming into distinct phases 2025-02-03 10:47:53 +01:00
bors
b7962922ce Auto merge of #133138 - azhogin:azhogin/target-modifiers, r=davidtwco,saethlin
Target modifiers (special marked options) are recorded in metainfo

Target modifiers (special marked options) are recorded in metainfo and compared to be equal in different linked crates.

PR for this RFC: https://github.com/rust-lang/rfcs/pull/3716

Option may be marked as `TARGET_MODIFIER`, example: `regparm: Option<u32> = (None, parse_opt_number, [TRACKED TARGET_MODIFIER]`.
If an TARGET_MODIFIER-marked option has non-default value, it will be recorded in crate metainfo as a `Vec<TargetModifier>`:
```
pub struct TargetModifier {
    pub opt: OptionsTargetModifiers,
    pub value_name: String,
}
```

OptionsTargetModifiers is a macro-generated enum.

Option value code (for comparison) is generated using `Debug` trait.

Error example:
```
error: mixing `-Zregparm` will cause an ABI mismatch in crate `incompatible_regparm`
  --> $DIR/incompatible_regparm.rs:10:1
   |
LL | #![crate_type = "lib"]
   | ^
   |
   = help: the `-Zregparm` flag modifies the ABI so Rust crates compiled with different values of this flag cannot be used together safely
   = note: `-Zregparm=1` in this crate is incompatible with `-Zregparm=2` in dependency `wrong_regparm`
   = help: set `-Zregparm=2` in this crate or `-Zregparm=1` in `wrong_regparm`
   = help: if you are sure this will not cause problems, use `-Cunsafe-allow-abi-mismatch=regparm` to silence this error

error: aborting due to 1 previous error
```

`-Cunsafe-allow-abi-mismatch=regparm,reg-struct-return` to disable list of flags.
2025-02-03 07:16:57 +00:00
bors
49dbfb8ad8 Auto merge of #136238 - marcoieni:free-disk-refactor, r=Kobzol
ci: refactor how directories are removed in free-disk-space disk

try-job: aarch64-gnu
2025-02-02 10:51:49 +00:00