Chayim Refael Friedman
d31e27fbe6
Merge pull request #21077 from asukaminato0721/18833
...
fix Display scope inlay hints after closing brace for more types of blocks #18833
2025-11-28 11:29:33 +00:00
Shoyu Vanilla (Flint)
0362682e50
Merge pull request #21023 from A4-Tacks/syntax-editor-duplicate-changed
...
Fix syntax_editor duplicated changed element
2025-11-28 10:48:45 +00:00
Asuka Minato
170d9b4a82
fix Display scope inlay hints after closing brace for more types of blocks
2025-11-28 19:44:24 +09:00
Lukas Wirth
6088208d7f
Merge pull request #21154 from Veykril/push-nvlktkknrqms
...
proc-macro-srv: Fix unnecessary subtree wrapping in protocol
2025-11-28 10:42:41 +00:00
Lukas Wirth
8610ebbc1d
proc-macro-srv: Fix unnecessary subtree wrapping in protocol
2025-11-28 11:32:35 +01:00
Chayim Refael Friedman
e31e2b1e2c
Merge pull request #21153 from ChayimFriedman2/msrv
...
minor: Increase MSRV to 1.91.0
2025-11-28 10:09:31 +00:00
Chayim Refael Friedman
b24f9b6531
Increase MSRV to 1.91.0
2025-11-28 11:59:40 +02:00
Chayim Refael Friedman
6c80657ae5
Merge pull request #20164 from ChayimFriedman2/fix-edition
...
fix: Pass the correct per-token (not global) edition when expanding macro_rules
2025-11-28 08:39:44 +00:00
Chayim Refael Friedman
a63a9441f0
Remove an incorrect test
...
It tests the opposite of the correct behavior.
2025-11-28 10:30:13 +02:00
Chayim Refael Friedman
ebda376545
Pass the correct per-token (not global) edition when expanding macro_rules
...
This was hard to do because of the separation between `mbe` and `hir-expand`, but became possible by the Salsa migration, as now `SyntaxContext` doesn't require `ExpandDatabase`, `salsa::Database` is enough.
2025-11-28 10:30:10 +02:00
Lukas Wirth
3e420122c5
Merge pull request #20217 from ChayimFriedman2/spec-resolve-hygiene
...
fix: Use root hygiene for speculative resolution
2025-11-28 08:13:06 +00:00
Lukas Wirth
83c188aa74
Merge pull request #20163 from ChayimFriedman2/parser-per-token-edition
...
fix: Use per-token, not global, edition in the parser
2025-11-28 08:11:38 +00:00
Shoyu Vanilla (Flint)
450860ae40
Merge pull request #21151 from ChayimFriedman2/no-cache-prime
...
fix: Don't run cache priming when disabled in settings
2025-11-28 04:37:16 +00:00
Chayim Refael Friedman
f7be6355ab
Don't run cache priming when disabled in settings
...
What a single operator precedence can do :)
2025-11-28 06:26:13 +02:00
Chayim Refael Friedman
74e9798d7f
Merge pull request #21141 from Wilfred/scip_enclosing_range
...
feature: Set enclosing_range field on SCIP output
2025-11-28 03:09:50 +00:00
Chayim Refael Friedman
a68be9cbbe
Merge pull request #21144 from A4-Tacks/abi-qualifier-extern-crate-comp
...
Fix complete after `extern`, add `crate` completion
2025-11-28 03:07:40 +00:00
Lukas Wirth
ac118f93ff
Merge pull request #21146 from Veykril/push-kwupvlsnstrx
...
proc-macro-srv: Fix `<TokenStream as Display>::fmt` impl rendering puncts as u8
2025-11-27 15:59:08 +00:00
Lukas Wirth
6bbdb1f6ae
proc-macro-srv: Fix <TokenStream as Display>::fmt impl rendering puncts as u8
2025-11-27 16:49:38 +01:00
Lukas Wirth
7f93ba5612
Merge pull request #21145 from Veykril/push-prwwrlwmoxzx
...
proc-macro-srv: Fix `<TokenStream as Display>::fmt` impl producing trailing whitespace
2025-11-27 13:01:10 +00:00
Lukas Wirth
2578d40f34
proc-macro-srv: Fix <TokenStream as Display>::fmt impl producing trailing whitespace
2025-11-27 13:51:20 +01:00
Lukas Wirth
41a2df5b38
Merge pull request #21095 from A4-Tacks/autoderef-skipiter
...
Fix skipiter not applicable in autoderef
2025-11-27 08:31:19 +00:00
Shoyu Vanilla (Flint)
32555af6a2
Merge pull request #20976 from A4-Tacks/comp-after-top-inner-attr
...
Fix not complete after inner-attr in source-file
2025-11-27 06:36:13 +00:00
Shoyu Vanilla (Flint)
e958534bfe
Merge pull request #21028 from A4-Tacks/comp-pattern-alias
...
Fix not complete type alias in pattern
2025-11-27 06:06:53 +00:00
Shoyu Vanilla (Flint)
b8191e675f
Merge pull request #20685 from A4-Tacks/enum-multi-gen-is-as
...
Add multiple generate for enum generate is, as, try_into
2025-11-27 06:05:55 +00:00
A4-Tacks
16a9a55d88
Fix complete after extern, add crate completion
...
Example
---
```rust
extern "C" $0
```
**Before this PR**
Can't be completion
**After this PR**
```text
kw async
kw const
kw enum
kw fn
kw impl
kw impl for
kw mod
kw pub
kw pub(crate)
kw pub(super)
kw static
kw struct
kw trait
kw type
kw union
kw unsafe
kw use
```
---
```rust
extern $0
```
**Before this PR**
Can't be completion
**After this PR**
```rust
extern crate $0;
```
2025-11-27 13:40:42 +08:00
Laurențiu Nicola
a60d5fa0c1
Merge pull request #21143 from rust-lang/rustc-pull
...
minor: sync from downstream
2025-11-27 05:34:29 +00:00
The rustc-josh-sync Cronjob Bot
fc4db45047
Merge ref '1be6b13be73d' from rust-lang/rust
...
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: 1be6b13be7
Filtered ref: 53d2132341f509072e83b49d4d82f17465ab164c
Upstream diff: https://github.com/rust-lang/rust/compare/6159a44067ebce42b38f062cc7df267a1348e092...1be6b13be73dc12e98e51b403add4c41a0b77759
This merge was created using https://github.com/rust-lang/josh-sync .
2025-11-27 04:08:49 +00:00
The rustc-josh-sync Cronjob Bot
8c5f7a3b7e
Prepare for merging from rust-lang/rust
...
This updates the rust-version file to 1be6b13be7 .
2025-11-27 04:08:44 +00:00
bors
1be6b13be7
Auto merge of #149079 - zachs18:clone_from_ref, r=Mark-Simulacrum
...
Add `Box::clone_from_ref` and similar under `feature(clone_from_ref)`
Tracking issue: https://github.com/rust-lang/rust/issues/149075
Accepted ACP: https://github.com/rust-lang/libs-team/issues/483
This PR implements `clone_from_ref` (and `try_*` and `_*in` variants), to get a `Box<T>`, `Arc<T>`, or `Rc<T>` by cloning from a `&T` where `T: CloneToUninit`.
The "Implement..." commits replace some ad-hoc conversions with `clone_from_ref` variants, which can be split out to a separate PR if desired.
This PR will conflict with https://github.com/rust-lang/rust/pull/148769 due to usage of `Layout::dangling` (which that PR is renaming to `dangling_ptr`), so they should not be rolled up together, and the one which merges later will need to be amended.
2025-11-26 18:21:00 +00:00
Wilfred Hughes
d2593e155c
feature: Set enclosing_range field on SCIP output
...
Previously we didn't set the enclosing position on definitions, so
SCIP consumers didn't know the position of the entire definition that
provides the symbol.
2025-11-26 17:11:21 +00:00
Lukas Wirth
f7970fddcf
Merge pull request #21139 from Veykril/push-wmxmrovmrrxx
...
internal: Gate spawning proc-macro-srv with --format on toolchain version
2025-11-26 16:43:06 +00:00
Lukas Wirth
c18ec026c7
Gate spawning proc-macro-srv with --format on toolchain version
2025-11-26 17:30:45 +01:00
bors
99ca3fc4ec
Auto merge of #149351 - Zalathar:rollup-ee06zha, r=Zalathar
...
Rollup of 12 pull requests
Successful merges:
- rust-lang/rust#147936 (Offload intrinsic)
- rust-lang/rust#148358 (Fix some issues around `rustc_public`)
- rust-lang/rust#148452 (Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors)
- rust-lang/rust#148751 (Build gnullvm toolchains on Windows natively)
- rust-lang/rust#148951 (rustc_target: aarch64: Remove deprecated FEAT_TME)
- rust-lang/rust#149149 ([rustdoc] misc search index cleanups)
- rust-lang/rust#149173 (Use rust rather than LLVM target features in the target spec)
- rust-lang/rust#149307 (Deny const auto traits)
- rust-lang/rust#149312 (Mark riscv64gc-unknown-linux-musl as tier 2 target)
- rust-lang/rust#149317 (Handle inline asm in has_ffi_unwind_calls)
- rust-lang/rust#149326 (Remove unused `Clone` derive on `DelayedLint`)
- rust-lang/rust#149341 (Add `Copy` to some AST enums.)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-26 15:10:08 +00:00
Stuart Cook
4a05348377
Rollup merge of #149341 - Jarcho:ast_copy, r=chenyukang
...
Add `Copy` to some AST enums.
It's a minor annoyance they aren't `Copy` and there doesn't seem to be any reason for them not to be.
2025-11-26 23:32:11 +11:00
Stuart Cook
25a861a21a
Rollup merge of #149326 - JonathanBrouwer:remove_clone, r=lcnr
...
Remove unused `Clone` derive on `DelayedLint`
2025-11-26 23:32:10 +11:00
Stuart Cook
a57d7539cb
Rollup merge of #149317 - bjorn3:has_ffi_unwind_calls_inline_asm, r=petrochenkov
...
Handle inline asm in has_ffi_unwind_calls
This is required for the soundness of `options(may_unwind)`.
Extracted from https://github.com/rust-lang/rust/pull/149141 .
2025-11-26 23:32:10 +11:00
Stuart Cook
3d404d0e9e
Rollup merge of #149312 - mati865:push-uxlynzmxzswo, r=wesleywiser
...
Mark riscv64gc-unknown-linux-musl as tier 2 target
According to https://github.com/rust-lang/rust/blob/cdb4236e654a49c3035269588fe22dfafc0cfa3a/src/doc/rustc/src/platform-support/riscv64gc-unknown-linux-musl.md?plain=1#L3 it's tier 2 target.
In case you are wondering how I noticed it:
Dockerfiles at Wild linker repo started to fail building recently due to missing `riscv64gc-unknown-linux-musl` std. I had hoped the problem would go away by itself, but it did not (it never does...).
https://github.com/rust-lang/rust/pull/148983 happened recently, so I checked https://rust-lang.github.io/rustup-components-history/riscv64gc-unknown-linux-musl.html and yeah, the date matches.
Given this condition: https://github.com/rust-lang/rust/blob/cdb4236e654a49c3035269588fe22dfafc0cfa3a/src/tools/build-manifest/build.rs#L35 I'm certain PR will fix the problem.
2025-11-26 23:32:09 +11:00
Stuart Cook
aa98135ace
Rollup merge of #149307 - lapla-cogito:deny_const_auto_trait, r=fmease
...
Deny const auto traits
close rust-lang/rust#149285
The AST validation now detects and rejects const auto traits. Additionally, I updated an existing test that was using `const unsafe auto trait`.
r? fmease
2025-11-26 23:32:08 +11:00
Stuart Cook
3b531a18b5
Rollup merge of #149173 - bjorn3:target_spec_rust_features, r=RalfJung
...
Use rust rather than LLVM target features in the target spec
This works better with non-LLVM codegen backends.
2025-11-26 23:32:08 +11:00
Stuart Cook
eb7e317e05
Rollup merge of #149149 - yotamofek:wip/rustdoc/search_index/misc-cleanups, r=GuillaumeGomez
...
[rustdoc] misc search index cleanups
Bunch of misc cleanups to search index generation (on the rustdoc side). Perf isn't improved unfortunately, but I do think most of these changes are improvements to readability/style.
Probably easier to review commit by commit.
2025-11-26 23:32:07 +11:00
Stuart Cook
da2d7583b2
Rollup merge of #148951 - maurer:remove-tme, r=folkertdev
...
rustc_target: aarch64: Remove deprecated FEAT_TME
fixes https://github.com/rust-lang/rust/issues/149308
ARM has withdrawn FEAT_TME
https://developer.arm.com/documentation/102105/lb-05/
LLVM has dropped support for generating it
llvm/llvm-project#167687
```@rustbot``` label llvm-main
r? ```@durin42```
2025-11-26 23:32:06 +11:00
Stuart Cook
e636017e7b
Rollup merge of #148751 - mati865:gnullvm-windows-host, r=marcoieni
...
Build gnullvm toolchains on Windows natively
Fixes https://github.com/rust-lang/rust/issues/144656
2025-11-26 23:32:06 +11:00
Stuart Cook
d1b9331a76
Rollup merge of #148452 - Fulgen301:pdb-large-symbols-v0, r=jackh726
...
Mangle symbols with a mangled name close to PDB limits with v0 instead of legacy mangling to avoid linker errors
This is rust-lang/compiler-team#934
As PDB debuginfo has a 64KiB limit for symbol names, we use v0 mangling instead of legacy mangling for symbol names >= 65000 bytes if PDB is used. The cutoff number was chosen to leave some room for potential errors in the empirical measurement of the limit of 65521 bytes, as well as potential symbol prefixes and suffixes that are applied later, plus some generous extra space.
Tracking issue: rust-lang/rust#148429
2025-11-26 23:32:05 +11:00
Stuart Cook
2ddaf4219e
Rollup merge of #148358 - makai410:rpub-test-fix, r=celinval
...
Fix some issues around `rustc_public`
cc rust-lang/rust#148266 .
follow-up of rust-lang/rust#148341 .
This fixes the issues that can be reproduced by `x test compiler/rustc_public`:
```
error: function `run` is never used
--> compiler/rustc_public/src/compiler_interface.rs:838:15
|
838 | pub(crate) fn run<'tcx, F, T>(interface: &CompilerInterface<'tcx>, f: F) -> Result<T, Error>
| ^^^
|
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
error: unreachable `pub` item
--> compiler/rustc_public/src/unstable/mod.rs:25:1
|
25 | pub trait InternalCx<'tcx>: Copy + Clone {
| ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| help: consider restricting its visibility: `pub(crate)`
|
= help: or consider exporting it for use by other crates
= note: `-D unreachable-pub` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unreachable_pub)]`
error: unreachable `pub` item
--> compiler/rustc_public/src/unstable/mod.rs:62:1
|
62 | pub trait Stable<'tcx>: PointeeSized {
| ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| help: consider restricting its visibility: `pub(crate)`
|
= help: or consider exporting it for use by other crates
error: unreachable `pub` item
--> compiler/rustc_public/src/unstable/mod.rs:81:1
|
81 | pub trait RustcInternal {
| ---^^^^^^^^^^^^^^^^^^^^
| |
| help: consider restricting its visibility: `pub(crate)`
|
= help: or consider exporting it for use by other crates
error: could not compile `rustc_public` (lib) due to 4 previous errors
```
2025-11-26 23:32:04 +11:00
Stuart Cook
2b150f2c65
Rollup merge of #147936 - Sa4dUs:offload-intrinsic, r=ZuseZ4
...
Offload intrinsic
This PR implements the minimal mechanisms required to run a small subset of arbitrary offload kernels without relying on hardcoded names or metadata.
- `offload(kernel, (..args))`: an intrinsic that generates the necessary host-side LLVM-IR code.
- `rustc_offload_kernel`: a builtin attribute that marks device kernels to be handled appropriately.
Example usage (pseudocode):
```rust
fn kernel(x: *mut [f64; 128]) {
core::intrinsics::offload(kernel_1, (x,))
}
#[cfg(target_os = "linux")]
extern "C" {
pub fn kernel_1(array_b: *mut [f64; 128]);
}
#[cfg(not(target_os = "linux"))]
#[rustc_offload_kernel]
extern "gpu-kernel" fn kernel_1(x: *mut [f64; 128]) {
unsafe { (*x)[0] = 21.0 };
}
```
2025-11-26 23:32:03 +11:00
bors
c797096598
Auto merge of #149140 - oli-obk:more-encoder-minimization, r=jdonszelmann
...
More encoder minimizations
follow-up to https://github.com/rust-lang/rust/pull/149054
2025-11-26 11:57:29 +00:00
Yotam Ofek
2a34631ab6
simplify_fn_type can only ever return 0 or 1 types, doesn't need to take &mut Vec
2025-11-26 12:24:20 +02:00
Yotam Ofek
b976f64768
collect into vectors
2025-11-26 12:24:12 +02:00
Yotam Ofek
25b720755e
Extract common functionality into closure
...
Also, use `Vec::resize` instead of individual `push`es
2025-11-26 12:21:31 +02:00
Yotam Ofek
51866db456
Pre-ensure size of vectors when performing union, instead of pushing default elements one by one
2025-11-26 12:21:31 +02:00