Shoyu Vanilla (Flint)
7de38d36eb
Merge pull request #20748 from A4-Tacks/migrate-arith-op-prec
...
Migrate `replace_arith_op` assist to use `SyntaxEditor`
2025-09-26 09:05:59 +00:00
Shoyu Vanilla (Flint)
8d4c00def0
Merge pull request #20599 from A4-Tacks/bang-de-morgan
...
Add applicable on bang `!` for apply_demorgan
2025-09-26 08:58:07 +00:00
A4-Tacks
93a96bf29c
Migrate replace_arith_op assist to use SyntaxEditor
2025-09-26 16:54:47 +08:00
Shoyu Vanilla (Flint)
a7df846d55
Merge pull request #20611 from A4-Tacks/replace-arith-op-prec
...
Fix precedence parenthesis for replace_arith_op
2025-09-26 08:30:46 +00:00
Shoyu Vanilla (Flint)
eb0cacbd32
Merge pull request #20604 from A4-Tacks/cfg-attr-comp
...
Add cfg_attr predicate completion
2025-09-26 08:10:25 +00:00
Shoyu Vanilla (Flint)
f1e67f5418
Merge pull request #20729 from A4-Tacks/const-param-kwd
...
Add const parameter keyword completion
2025-09-26 07:00:52 +00:00
Shoyu Vanilla (Flint)
c491a330f3
Merge pull request #20731 from A4-Tacks/expand-rest-pat-in-tuple-slice-pat
...
Fix expand rest pattern in tuple and slice pattern
2025-09-26 06:54:30 +00:00
A4-Tacks
38284d10dc
Fix expand rest pattern in tuple and slice pattern
...
Assist: expand_tuple_rest_pattern
Fills fields by replacing rest pattern in tuple patterns.
Example
---
```
fn foo(bar: (char, i32, i32)) {
let (ch, ..$0) = bar;
}
```
->
```
fn foo(bar: (char, i32, i32)) {
let (ch, _1, _2) = bar;
}
```
---
Assist: expand_slice_rest_pattern
Fills fields by replacing rest pattern in slice patterns.
Example
---
```
fn foo(bar: [i32; 3]) {
let [first, ..$0] = bar;
}
```
->
```
fn foo(bar: [i32; 3]) {
let [first, _1, _2] = bar;
}
```
2025-09-26 14:44:05 +08:00
Shoyu Vanilla (Flint)
acd320f7b3
Merge pull request #20598 from A4-Tacks/let-chain-sup-conv-to-guarded-ret
...
Add let-chain support for convert_to_guarded_return
2025-09-26 06:42:10 +00:00
Shoyu Vanilla (Flint)
35f76dfcd9
Merge pull request #20736 from A4-Tacks/fix-invert-if-let-chain
...
Fix applicable on if-let-chain for invert_if
2025-09-26 05:36:52 +00:00
Shoyu Vanilla (Flint)
79b0a927b9
Merge pull request #20742 from A4-Tacks/unused-raw-var
...
Fix fixes for unused raw variables
2025-09-26 05:25:09 +00:00
A4-Tacks
11c35cd0bc
Add applicable in closure for convert_to_guarded_return
...
Example
---
```rust
fn main() {
let _f = || {
bar();
if$0 true {
foo();
// comment
bar();
}
}
}
```
->
```rust
fn main() {
let _f = || {
bar();
if false {
return;
}
foo();
// comment
bar();
}
}
```
2025-09-25 22:04:53 +08:00
A4-Tacks
1947949f3d
Fix not applicable for if-expr in let-stmt
...
Example
---
```rust
fn main() {
let _x = loop {
if$0 let Ok(x) = Err(92) {
foo(x);
}
};
}
```
**Before**:
Assist not applicable
**After**:
```rust
fn main() {
let _x = loop {
let Ok(x) = Err(92) else { continue };
foo(x);
};
}
```
2025-09-25 22:00:56 +08:00
A4-Tacks
c1cd1da668
Add let-chain support for convert_to_guarded_return
...
- And add early expression `None` in function `Option` return
Example
---
```rust
fn main() {
if$0 let Ok(x) = Err(92)
&& x < 30
&& let Some(y) = Some(8)
{
foo(x, y);
}
}
```
->
```rust
fn main() {
let Ok(x) = Err(92) else { return };
if x >= 30 {
return;
}
let Some(y) = Some(8) else { return };
foo(x, y);
}
```
2025-09-25 21:04:48 +08:00
A4-Tacks
a9637efa27
Fix fixes for unused raw variables
...
Example
---
```
fn main() {
let $0r#type = 2;
}
```
**Before this PR**:
```rust
fn main() {
let _r#type = 2;
}
```
**After this PR**:
```rust
fn main() {
let _type = 2;
}
```
2025-09-25 19:58:45 +08:00
Shoyu Vanilla (Flint)
70d56dde8f
Merge pull request #20738 from jackh726/next-trait-solver-next4
...
Remove non-ns version of impl_self_ty and impl_trait
2025-09-25 10:30:54 +00:00
Shoyu Vanilla (Flint)
6fdf6b53eb
Merge pull request #20735 from itsjunetime/fix_scip_salsa
...
fix SCIP panicking due to salsa not attaching
2025-09-25 10:30:12 +00:00
Laurențiu Nicola
4a39e597d2
Merge pull request #20740 from rust-lang/rustc-pull
...
Rustc pull update
2025-09-25 08:06:08 +00:00
Laurențiu Nicola
13d512f2d5
Install cargo for proc-macro-srv tests
2025-09-25 10:54:58 +03:00
Laurențiu Nicola
61792afab9
Also install rustfmt on stable
2025-09-25 10:19:23 +03:00
The rustc-josh-sync Cronjob Bot
ff7e731983
Merge ref ' caccb4d036' from rust-lang/rust
...
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: caccb4d036
Filtered ref: 0f345ed05d559bbfb754f1403b16199366cda2e0
Upstream diff: 21a19c297d...caccb4d036
This merge was created using https://github.com/rust-lang/josh-sync .
2025-09-25 04:16:26 +00:00
Nikita Popov
d226e7aa93
Use standard attribute logic for allocator shim
...
Use llfn_attrs_from_instance() to generate the attributes for the
allocator shim. This ensures that we generate all the usual
attributes (and don't get to find out one-by-one that a certain
attribute is important for a certain target). Additionally this
will enable emitting the allocator-specific attributes (not
included here).
This change is quite awkward because the allocator shim uses
SimpleCx, while llfn_attrs_from_instance uses CodegenCx. I've
switched it to use SimpleCx plus tcx/sess arguments where necessary.
If there's a simpler way to do this, I'd love to know about it...
2025-09-25 10:04:40 +02:00
The rustc-josh-sync Cronjob Bot
3280c210dd
Prepare for merging from rust-lang/rust
...
This updates the rust-version file to caccb4d036 .
2025-09-25 04:11:22 +00:00
itsjunetime
16460273e0
fix SCIP panicking due to salsa not attaching
2025-09-24 18:47:36 -05:00
bors
caccb4d036
Auto merge of #146999 - matthiaskrgr:rollup-0gbkm82, r=matthiaskrgr
...
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#146711 (fix 2 borrowck issues)
- rust-lang/rust#146857 (revert change removing `has_infer` check. Commit conservatively patch…)
- rust-lang/rust#146897 (fix ICE in rustdoc::invalid_html_tags)
- rust-lang/rust#146915 (Make missed precondition-free float intrinsics safe)
- rust-lang/rust#146932 (Switch next-solver related rustc dependencies of r-a to crates.io ones)
- rust-lang/rust#146959 (temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions)
- rust-lang/rust#146964 (library: std: sys: pal: uefi: Add some comments)
- rust-lang/rust#146969 (const-eval: better wording for errors involving maybe-null pointers)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-24 18:35:58 +00:00
Matthias Krüger
ec378dc773
Rollup merge of #146969 - RalfJung:maybe-null-errors, r=oli-obk
...
const-eval: better wording for errors involving maybe-null pointers
Fixes https://github.com/rust-lang/rust/issues/146748
r? ``@oli-obk``
2025-09-24 20:34:31 +02:00
Matthias Krüger
24e19c9088
Rollup merge of #146964 - Ayush1325:close-protocol, r=joboet
...
library: std: sys: pal: uefi: Add some comments
I seemed to have forgotten that since I am using GET_PROTOCOL attribute for the std usecases, I did not need to close the protocols explicitly. So adding these comments as a note to future self not to waste time on the same thing again.
2025-09-24 20:34:31 +02:00
Matthias Krüger
af224996c6
Rollup merge of #146959 - tshepang:patch-2, r=nnethercote
...
temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions
Also
- add Reference id
- fix typo
2025-09-24 20:34:29 +02:00
Matthias Krüger
4300cd64df
Rollup merge of #146932 - ShoyuVanilla:ra-in-tree-hack, r=lcnr
...
Switch next-solver related rustc dependencies of r-a to crates.io ones
r? ``@ghost``
cc ``@lnicola`` ``@lcnr``
2025-09-24 20:34:25 +02:00
Matthias Krüger
2320fc3a38
Rollup merge of #146915 - clarfonthey:safe-intrinsics-2, r=RalfJung
...
Make missed precondition-free float intrinsics safe
So, in my defence, these were both separated out from the other intrinsics in the file *and* had a different safety comment in the stable versions, so, I didn't notice them before. But, in my offence, the entire reason I did the previous PR was because I was using them for SIMD intrinsic fallbacks, and `fabs` is needed for those too, so, I don't really have an excuse.
Extra follow-up to rust-lang/rust#146683 .
r? ```@RalfJung``` who reviewed the previous one
These don't appear to be used anywhere outside of the standard locations, at least.
2025-09-24 20:34:22 +02:00
Matthias Krüger
4e225ee72d
Rollup merge of #146897 - lolbinarycat:rustdoc-invalid_html_tags-ice-146890, r=GuillaumeGomez
...
fix ICE in rustdoc::invalid_html_tags
fixes https://github.com/rust-lang/rust/issues/146890
r? ```@GuillaumeGomez```
2025-09-24 20:34:21 +02:00
Matthias Krüger
79bb3c4879
Rollup merge of #146857 - tnuha:revert_self_has_no_region_infer, r=lcnr
...
revert change removing `has_infer` check. Commit conservatively patch…
…es for now, but more development proceeding.
Hotfix for rust-lang/rust#146852 .
2025-09-24 20:34:20 +02:00
Matthias Krüger
3150538911
Rollup merge of #146711 - lcnr:fix-placeholder-ice, r=lqd
...
fix 2 borrowck issues
fixes https://github.com/rust-lang/rust/issues/146467 cc ``@amandasystems``
our understanding here is as follows: region constraints from computing implied bounds gets `ConstraintCategory::Internal`. If there's a higher-ranked subtyping errors while computing implied bounds we then ended up with only `ConstraintCategory::Internal` and `ConstraintCategory::OutlivesUnnameablePlaceholder(_)` constraints.
The path was something like
- `'placeholderU2: 'placeholderU1` (`Internal`)
- `'placeholderU1: 'static` (`OutlivesUnnameablePlaceholder('placeholderU2)`)
It's generally somewhat subtle here as ideally relating placeholders doesn't introduce `'static` constraints. Relating the placeholders themselves will always error regardless, cc https://github.com/rust-lang/rust/pull/142623 .
---
separately fixes https://github.com/rust-lang/rust/pull/145925#issuecomment-3303733357 by updating the location for deferred closure requirements inside of promoteds. I am not updating their category as doing so is 1) effort and 2) imo actually undesirable 🤔 see the comments in `TypeChecker::check_promoted` cc ``@lqd``
r? lqd
2025-09-24 20:34:19 +02:00
Chayim Refael Friedman
da9831cc04
Merge pull request #20721 from ChayimFriedman2/fix-never
...
fix: Implement fallback properly
2025-09-24 18:16:15 +00:00
Chayim Refael Friedman
a3840d9592
Implement fallback properly
...
fallback.rs was ported straight from rustc (minus the lint parts).
This fixes the `!` regressions.
2025-09-24 20:42:06 +03:00
Chayim Refael Friedman
871261ac14
Merge pull request #20683 from regexident/inference-result-types-iter
...
Expose iterators over an inference result's types
2025-09-24 17:12:33 +00:00
bors
15283f6fe9
Auto merge of #146338 - CrooseGit:dev/reucru01/AArch64-enable-GCS, r=Urgau,davidtwco
...
Extends AArch64 branch protection support to include GCS
Extends existing support for AArch64 branch protection to include support for [Guarded Control Stacks](https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022#guarded-control-stack-gcs:~:text=Extraction%20or%20tracking.-,Guarded%20Control%20Stack%20(GCS),-With%20the%202022 ).
2025-09-24 13:04:19 +00:00
Shoyu Vanilla
0e7cc32633
Switch next-solver related rustc dependencies of r-a to crates.io ones
2025-09-24 21:28:50 +09:00
Ralf Jung
8328c3dada
const validation: better error for maybe-null references
2025-09-24 13:35:29 +02:00
Ralf Jung
0a41add629
const-eval: improve and actually test the errors when pointers might be outside the range of a scalar
2025-09-24 13:34:33 +02:00
lcnr
3378997867
fix wording
...
Co-authored-by: Rémy Rakic <remy.rakic+github@gmail.com>
2025-09-24 12:50:50 +02:00
bors
e9385f9eea
Auto merge of #146946 - matthiaskrgr:rollup-fsmrqez, r=matthiaskrgr
...
Rollup of 6 pull requests
Successful merges:
- rust-lang/rust#146818 (constify {float}::total_cmp())
- rust-lang/rust#146896 (rustc-dev-guide subtree update)
- rust-lang/rust#146898 (Update books)
- rust-lang/rust#146899 (Fix a crash/mislex when more than one frontmatter closing possibility is considered)
- rust-lang/rust#146904 (rust-lang/rust#140368 Mutex/RwLock/ReentrantLock::data_ptr to be const fn)
- rust-lang/rust#146907 (add regression test for issue 146537)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-24 09:55:21 +00:00
Ayush Singh
03fd823dbf
library: std: sys: pal: uefi: Add some comments
...
I seemed to have forgotten that since I am using GET_PROTOCOL attribute
for the std usecases, I did not need to close the protocols explicitly.
So adding these comments as a note to future self not to waste time on
the same thing again.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-09-24 13:26:03 +05:30
A4-Tacks
6e897949a5
Fix applicable on if-let-chain for invert_if
...
Example
---
```rust
fn f() { i$0f x && let Some(_) = Some(1) { 1 } else { 0 } }
```
**Before this PR**:
```rust
fn f() { if !(x && let Some(_) = Some(1)) { 0 } else { 1 } }
```
**After this PR**:
Assist not applicable
2025-09-24 14:36:09 +08:00
jackh726
763ef13d3c
Remove non-ns version of impl_self_ty and impl_trait
2025-09-24 05:45:12 +00:00
Tshepang Mbambo
c9dc0e307a
temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions
...
Also
- add Reference id
- fix typo
2025-09-24 07:01:24 +02:00
Shoyu Vanilla (Flint)
affd5c0df2
Merge pull request #20733 from jackh726/next-trait-solver-next3
...
Convert more things from chalk to next solver
2025-09-24 04:52:28 +00:00
bors
3e887f5faa
Auto merge of #146953 - dianqk:update-llvm, r=cuviper
...
Update LLVM to 21.1.2
Fixes rust-lang/rust#146065 .
2025-09-24 04:25:26 +00:00
dianqk
95ddfa102a
Update LLVM to 21.1.2
2025-09-24 07:34:22 +08:00
ltdk
e8a8e061bf
Make missed precondition-free float intrinsics safe
2025-09-23 18:15:11 -04:00