Commit Graph

311294 Commits

Author SHA1 Message Date
Young-Flash b3db306b11 refactor: remove unused code 2025-11-21 22:12:08 +08:00
Chayim Refael Friedman 57c0f1f1f4 Merge pull request #21053 from dfireBird/fix_panic_20965
fix: extract function panics on more than one usage of variable in macro
2025-11-20 05:59:26 +00:00
Chayim Refael Friedman db57f44775 Merge pull request #21036 from Natural-selection1/ref
fix: make postfix completion handle all references correctly
2025-11-20 05:50:26 +00:00
dfireBird 4a617a5fdf fix: use unique instead of dedup 2025-11-20 11:15:26 +05:30
Chayim Refael Friedman a7c8878dbf Merge pull request #21026 from Veykril/veykril/push-xtwpvurpxywx
Infer range pattern fully
2025-11-20 05:35:59 +00:00
Lukas Wirth 5f991a7bf2 Infer range pattern fully 2025-11-20 07:15:33 +02:00
Chayim Refael Friedman b8c3810bc9 Merge pull request #21068 from Aditya-PS-05/feat/configure-dyn-inlay-hint
feat: make dyn inlay hints configurable
2025-11-20 05:00:55 +00:00
Aditya-PS-05 d2f389dc9d feat: make dyn inlay hints configurable 2025-11-20 00:37:01 +05:30
Lukas Wirth a91049e312 Merge pull request #21066 from Veykril/push-nzmyznpnulzm
fix: Fix release workflow
2025-11-19 12:23:30 +00:00
Lukas Wirth 03dce15fdc fix: Fix release workflow 2025-11-19 13:13:27 +01:00
Laurențiu Nicola 89329293d9 Merge pull request #21064 from lnicola/book-multilingual
minor: Drop `multilingual` field from the book config
2025-11-19 08:41:39 +00:00
Lukas Wirth 383f1ee0ee Merge pull request #21060 from ChayimFriedman2/adjust-last
fix: Fix some inference of patterns
2025-11-19 08:38:41 +00:00
Lukas Wirth c1fc86068b Merge pull request #21061 from ChayimFriedman2/infer-array-size
fix: Allow inferring array sizes
2025-11-19 08:36:42 +00:00
Laurențiu Nicola 318f6a0217 Drop multilingual field from the book config 2025-11-19 10:31:42 +02:00
Laurențiu Nicola 00b1e3fd52 Merge pull request #21062 from lnicola/sync-from-rust
minor: sync from downstream
2025-11-19 06:38:52 +00:00
Laurențiu Nicola 9a9b069124 Merge ref '6159a44067eb' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 6159a44067
Filtered ref: 6ab1e12842abe4da734757701b2f17970e11f6b9
Upstream diff: https://github.com/rust-lang/rust/compare/c5dabe8cf798123087d094f06417f5a767ca73e8...6159a44067ebce42b38f062cc7df267a1348e092

This merge was created using https://github.com/rust-lang/josh-sync.
2025-11-19 08:27:10 +02:00
Laurențiu Nicola f278795984 Prepare for merging from rust-lang/rust
This updates the rust-version file to 6159a44067.
2025-11-19 08:26:21 +02:00
Hegui Dai 1c7d74576f make postfix completion handle all references correctly 2025-11-19 12:01:01 +08:00
Chayim Refael Friedman d0b9e866e3 Allow inferring array sizes 2025-11-19 05:23:48 +02:00
Chayim Refael Friedman 1f5e2668ad Rewrite tuple pattern inference to match rustc
It was subtly incorrect in how it handles the expected type.
2025-11-19 05:01:33 +02:00
bors 6159a44067 Auto merge of #148434 - oli-obk:inherent-const-impl, r=fee1-dead
Inherent const impl

Some constifications are annoying because we need to repeat `T: Trait` bounds from an impl block on the individual constified `const fn`s as `T: [const] Trait`. We've brainstormed solutions before, and one would be to have separate `const impl` blocks or sth. However the final syntax will look, I decided to just impl this syntax and either have sth nice on nightly to work with or at least move the discussion along.

Also interacts with the discussion around `impl const Trait for Type` vs `const impl Trait for Type`, as we may want to use the latter to keep inherent and trait impls in sync (unless we come up with even another scheme).

* [ ] rustdoc + tests
* [ ] macro stability /regression tests

r? `@fee1-dead`

cc `@traviscross` `@rust-lang/project-const-traits`
2025-11-19 02:23:56 +00:00
Chayim Refael Friedman 1962be3500 The type of a binding in a Pat::Bind is the expected type, not the inferred type of the pattern
The inferred type is reconstructed with match ergonomics, e.g. matching against `(&&i32, &&i32)` could give `(i32, i32)`), but we of course cannot bind to that.
2025-11-19 03:45:11 +02:00
dfireBird 98f6af010a fix: allow equality expressions in parsing of format_args 2025-11-19 07:12:16 +05:30
dfireBird 3f78a32391 fix: extract function panics on more than one usage of variable in macro 2025-11-19 07:12:16 +05:30
Chayim Refael Friedman a0b8112c24 The type after pattern adjustments is stored in the last adjustment, not the first 2025-11-19 03:12:20 +02:00
Shoyu Vanilla (Flint) d9ac90b3f9 Merge pull request #21059 from ChayimFriedman2/trait-env
fix: Derive ParamEnv from GenericPredicates
2025-11-19 00:06:10 +00:00
Chayim Refael Friedman 3a2ca9a212 Derive ParamEnv from GenericPredicates
Instead of relowering them. This way we save time and prevent mismatches.
2025-11-19 01:48:16 +02:00
Chayim Refael Friedman 1afb6f0535 Merge pull request #20974 from ChayimFriedman2/ns4
fix: Rewrite method resolution to follow rustc more closely
2025-11-18 23:20:04 +00:00
bors 7c2c3c0ded Auto merge of #149063 - matthiaskrgr:rollup-6z23izv, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#147887 (Improve the documentation of atomic::fence)
 - rust-lang/rust#148281 (repr(transparent) check: do not compute check_unsuited more than once)
 - rust-lang/rust#148484 (Fix suggestion for the `cfg!` macro)
 - rust-lang/rust#149057 (`rust-analyzer` subtree update)
 - rust-lang/rust#149061 (debug-assert FixedSizeEncoding invariant)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-18 21:59:27 +00:00
Shoyu Vanilla (Flint) 779ab267f0 Merge pull request #21015 from ShoyuVanilla/cargo-config-origin
fix: Parse cargo config files with origins
2025-11-18 17:29:43 +00:00
Shoyu Vanilla b108934bbc fix: Parse cargo config files with origins 2025-11-19 01:20:50 +09:00
Shoyu Vanilla d38e72248c Add toml as a dependency of project-model and unify version 2025-11-19 01:15:04 +09:00
Oli Scherer b41c2a2870 Forbid const fn within const impls 2025-11-18 16:00:18 +00:00
Oli Scherer ababa26251 Collect const_conditions for inherent impls 2025-11-18 16:00:18 +00:00
Oli Scherer 939afab37e Treat inherent methods in const impl blocks as const 2025-11-18 16:00:18 +00:00
Oli Scherer 00157d4a3d Allow inherent const impl blocks 2025-11-18 16:00:18 +00:00
Matthias Krüger ceb33e9a3a Rollup merge of #149061 - jdonszelmann:fixed-size-encoding-assert, r=oli-obk
debug-assert FixedSizeEncoding invariant

Something like this? It asserts during encoding that for that type, decoding 0 would give the default.
Preferably, I'd either somehow statically/in const assert it once, instead of every time, but I see no easy way to do so. It'd require us to iterate all types that implement the trait or something. Let me know what you think

No types currently violate this invariant.

r? `@oli-obk`
2025-11-18 16:52:13 +01:00
Matthias Krüger 5d243031e2 Rollup merge of #149057 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/afcfe141aec0fd7a7a16ddbec07f2e76aa5ea0e0.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-11-18 16:52:12 +01:00
Matthias Krüger 642300e339 Rollup merge of #148484 - JonathanBrouwer:wip_attr_style, r=jdonszelmann
Fix suggestion for the `cfg!` macro

r? `@jdonszelmann`
2025-11-18 16:52:11 +01:00
Matthias Krüger 280a6c5304 Rollup merge of #148281 - RalfJung:repr-transparent-check, r=nnethercote
repr(transparent) check: do not compute check_unsuited more than once

`field_infos` is an iterator that we execute multiple times. However, we usually ignore the `unsuited` field -- we only need it in the last iteration. So move the computation of that field to that iteration to avoid computing it multiple times. Computing `unsuited` involves a recursive traversal over the types of all non-trivial fields, so there can be non-trivial amounts of work here.

(I benchmarked this in https://github.com/rust-lang/rust/pull/148243 and saw no changes, probably because we don't have a benchmark with many repr(transparent) types. But still, computing this each time just seemed silly.)
2025-11-18 16:52:10 +01:00
Matthias Krüger e6d08c6521 Rollup merge of #147887 - matthieu-m:task/lib-core-sync-atomic-fence-doc-improvement, r=Mark-Simulacrum
Improve the documentation of atomic::fence

Attempt to "fix" two flaws of the current documentation:

1. The over-emphasis of fence - fence synchronization, relegating atomic - fence and fence - atomic synchronization to second fiddle.
2. The lack of explanation as to how to properly perform atomic - fence and fence - atomic synchronization.

It does so by first making it clear that there are 3 different ways to use an atomic fence, then presenting a full example for each usecase, noting the particular position of the fence with regard to the atomic operation, and rounding up with generic notes.
2025-11-18 16:52:10 +01:00
Lukas Wirth 27b01bc678 Merge pull request #21047 from A4-Tacks/unsafe-attr
Add `unsafe(…)` attribute completion
2025-11-18 15:39:26 +00:00
Lukas Wirth c5bb924c6d Merge pull request #21055 from rust-lang/dependabot/npm_and_yarn/editors/code/js-yaml-3.14.2
Bump js-yaml from 3.14.1 to 3.14.2 in /editors/code
2025-11-18 15:37:49 +00:00
Lukas Wirth 216b26b981 Merge pull request #21056 from rust-lang/dependabot/npm_and_yarn/editors/code/glob-11.1.0
Bump glob from 11.0.1 to 11.1.0 in /editors/code
2025-11-18 15:37:44 +00:00
Lukas Wirth 806965405f Merge pull request #21057 from A4-Tacks/hir-debug-precedence
Implement precedence for print_hir
2025-11-18 15:35:23 +00:00
Lukas Wirth 62f025669d Merge pull request #21019 from Natural-selection1/format
minor: format T_
2025-11-18 15:35:09 +00:00
Jana Dönszelmann d1bcf2ec84 debug-assert FixedSizeEncoding invariant 2025-11-18 15:59:04 +01:00
A4-Tacks 4774189d94 Implement precedence for print_hir
Example
---
viewHir

```rust
fn main() {
    let r = &2;
    let _ = &mut (*r as i32)
}
```

**Before this PR**

```rust
fn main() {
    let r = &2;
    let _ = &mut *r as i32;
}
```

**After this PR**

```rust
fn main() {
    let r = &2;
    let _ = &mut (*r as i32);
}
```
2025-11-18 22:22:59 +08:00
Chayim Refael Friedman 8f330999a1 Merge pull request #21018 from Natural-selection1/visibility
fix: make visibility diagnostics for fields to correct location
2025-11-18 14:13:19 +00:00
bors 3d461af2a2 Auto merge of #149059 - GuillaumeGomez:rollup-s6m2mmy, r=GuillaumeGomez
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#148970 (std: sys: fs: uefi: Implement stat)
 - rust-lang/rust#149020 (flush_delayed: add note about stashed diagnostics)
 - rust-lang/rust#149026 (Add test for href of reexported enum variant)
 - rust-lang/rust#149049 (compiletest: Use JSON "binary-format" to decide `//@ only-elf` and `//@ ignore-elf`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-18 14:07:46 +00:00