Commit graph

318446 commits

Author SHA1 Message Date
Eddy (Eduard) Stefes
c6f57becfc remove redundant backchain attribute in codegen
llvm will look at both
1. the values of "target-features" and
2. the function string attributes.

this removes the redundant function string attribute because it is not needed at all.
rustc sets the `+backchain` attribute through `target_features_attr(...)`
2026-02-12 09:58:25 +01:00
Ralf Jung
0cbe1cc992 try to work around rustdoc bug, and other rustdoc adjustments 2026-02-12 09:09:35 +01:00
Ralf Jung
590c1c9966 UnsafePinned: implement opsem effects of UnsafeUnpin 2026-02-12 09:09:35 +01:00
yukang
caf7cdf558 Improve code suggestion for incorrect macro_rules! usage 2026-02-12 15:30:41 +08:00
Zalathar
576901f3a4 Don't use DepContext in rustc_middle::traits::cache
This code is now in `rustc_middle`, and doesn't need any non-trivial methods,
so it can just use `TyCtxt` directly instead.
2026-02-12 18:30:16 +11:00
bors
7ad4e69ad5 Auto merge of #152517 - jhpratt:rollup-fGRcId6, r=jhpratt
Rollup of 17 pull requests

Successful merges:

 - rust-lang/rust#142415 (Add note when inherent impl for a alias type defined outside of the crate)
 - rust-lang/rust#142680 (Fix passing/returning structs with the 64-bit SPARC ABI)
 - rust-lang/rust#150768 (Don't compute FnAbi for LLVM intrinsics in backends)
 - rust-lang/rust#151152 (Add FCW for derive helper attributes that will conflict with built-in attributes)
 - rust-lang/rust#151814 (layout: handle rigid aliases without params)
 - rust-lang/rust#151863 (Borrowck: simplify diagnostics for placeholders)
 - rust-lang/rust#152159 (Add note for `?Sized` params in int-ptr casts diag)
 - rust-lang/rust#152434 (Clarify names of `QueryVTable` functions for "executing" a query)
 - rust-lang/rust#152478 (Remove tm_factory field from CodegenContext)
 - rust-lang/rust#152498 (Partially revert "resolve: Update `NameBindingData::vis` in place")
 - rust-lang/rust#152316 (fix: add continue)
 - rust-lang/rust#152394 (Correctly check if a macro call is actually a macro call in rustdoc highlighter)
 - rust-lang/rust#152425 (Port #![test_runner] to the attribute parser)
 - rust-lang/rust#152481 (Use cg_ssa's produce_final_output_artifacts in cg_clif)
 - rust-lang/rust#152485 (fix issue#152482)
 - rust-lang/rust#152495 (Clean up some subdiagnostics)
 - rust-lang/rust#152502 (Implement `BinaryHeap::from_raw_vec`)
2026-02-12 06:57:59 +00:00
Jacob Pratt
faac3c579f
Rollup merge of #152502 - Dan54:heap-from-raw-vec, r=scottmcm
Implement `BinaryHeap::from_raw_vec`

Implements rust-lang/rust#152500.

Adds a `BinaryHeap::from_raw_vec` function, which constructs a `BinaryHeap` without performing a heapify, for data that is already a max-heap.
2026-02-12 00:41:12 -05:00
Jacob Pratt
9376482de2
Rollup merge of #152495 - JonathanBrouwer:remove-empty-subdiags, r=lqd
Clean up some subdiagnostics

Just a nice minor cleanup :)
* Removes some empty subdiagnostics which could just be subdiagnostic attributes
* Convert some manual implementation of `Subdiagnostic` to derives
2026-02-12 00:41:12 -05:00
Jacob Pratt
58228781da
Rollup merge of #152485 - ban-xiu:fix-issue-152482, r=jieyouxu
fix issue#152482

Close https://github.com/rust-lang/rust/issues/152482
2026-02-12 00:41:11 -05:00
Jacob Pratt
596faf0f26
Rollup merge of #152481 - bjorn3:backends_reduce_duplication, r=fmease
Use cg_ssa's produce_final_output_artifacts in cg_clif
2026-02-12 00:41:11 -05:00
Jacob Pratt
9cbcd11ae4
Rollup merge of #152425 - Ozzy1423:test-runner, r=JonathanBrouwer
Port #![test_runner] to the attribute parser

Tracking issue: https://github.com/rust-lang/rust/issues/131229

r? @JonathanBrouwer
2026-02-12 00:41:10 -05:00
Jacob Pratt
4bc90240e1
Rollup merge of #152394 - GuillaumeGomez:macro-call, r=lolbinarycat
Correctly check if a macro call is actually a macro call in rustdoc highlighter

Fixes rust-lang/rust#151904.

Issues was that if there was a `!` following an ident, we would always assume it's a macro call... except it's very lacking. I'm actually surprised it went for so long unnoticed. To fix it, I added a check for the next (non-blank) token after the `!`, if it's a `{` or a `[` or a `(`, then only do we consider it to be a macro call.

r? @lolbinarycat
2026-02-12 00:41:10 -05:00
Jacob Pratt
3ba1a835d1
Rollup merge of #152316 - cuiweixie:bugfix-continue, r=petrochenkov
fix: add continue

 should be same in:
d3ec6a351a/compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/static_impl_trait.rs (L156-L159)
2026-02-12 00:41:09 -05:00
Jacob Pratt
8193067abd
Rollup merge of #152498 - petrochenkov:revoverglob, r=jieyouxu
Partially revert "resolve: Update `NameBindingData::vis` in place"

Partial revert of 227e7bd48b.
This is a minimal fix for backporting to beta, I'll submit proper fixes later.

Fixes rust-lang/rust#152004
Fixes rust-lang/rust#151124
Fixes rust-lang/rust#152347
2026-02-12 00:41:09 -05:00
Jacob Pratt
d0b2d841e7 Rollup merge of #152478 - bjorn3:lto_refactors10, r=wesleywiser
Remove tm_factory field from CodegenContext

This is necessary to support serializing the `CodegenContext` to a `.rlink` file in the future for moving LTO to the `-Zlink-only` step.

Follow up to https://github.com/rust-lang/rust/pull/149209
Part of https://github.com/rust-lang/compiler-team/issues/908
2026-02-12 00:41:08 -05:00
Jacob Pratt
c41f9343e9
Rollup merge of #152478 - bjorn3:lto_refactors10, r=wesleywiser
Remove tm_factory field from CodegenContext

This is necessary to support serializing the `CodegenContext` to a `.rlink` file in the future for moving LTO to the `-Zlink-only` step.

Follow up to https://github.com/rust-lang/rust/pull/149209
Part of https://github.com/rust-lang/compiler-team/issues/908
2026-02-12 00:41:08 -05:00
Jacob Pratt
0e746d0a25
Rollup merge of #152434 - Zalathar:call-query, r=nnethercote
Clarify names of `QueryVTable` functions for "executing" a query

In the query system, there are several layers of functions involved in “executing” a query, with very different responsibilities at each layer, making it important to be able to tell them apart.

This PR renames two of the function pointers in `QueryVTable`, along with their associated helper functions, to hopefully do a better job of indicating what their actual responsibilities are.

r? nnethercote
2026-02-12 00:41:08 -05:00
Jacob Pratt
3ad8e9ce04
Rollup merge of #152159 - JohnTitor:issue-74756, r=estebank
Add note for `?Sized` params in int-ptr casts diag

Close rust-lang/rust#74756
2026-02-12 00:41:07 -05:00
Jacob Pratt
e4375da4e8
Rollup merge of #151863 - amandasystems:streamline-borrow-error-handling, r=lcnr
Borrowck: simplify diagnostics for placeholders

This folds the call to `region_from_element` into `RegionInferenceContext`, and simplifies the error variant for this case to only talk about regions as opposed to elements. This is the only case where a `RegionElement` leaks out of region inference, so now they can be considered internal to region inference (though that currently isn't expressed). It also clarifies the type information on the methods called to emphasise the fact that they only ever use placeholder regions in the diagnostics completely ignore any other element.

It also adds a bunch of FIXMEs to some fishy statements that conjure universes from what seems like arbitrary integers.

This was lifted from rust-lang/rust#142623.

r? @lcnr
2026-02-12 00:41:07 -05:00
Jacob Pratt
3db13e22b7
Rollup merge of #151814 - lcnr:silent-layout-error, r=jackh726
layout: handle rigid aliases without params

fixes rust-lang/rust#151791

r? types
2026-02-12 00:41:07 -05:00
Jacob Pratt
4e244c7cd5 Rollup merge of #150768 - bjorn3:llvm_intrinsic_no_fn_abi, r=wesleywiser
Don't compute FnAbi for LLVM intrinsics in backends

~~This removes support for `extern "unadjusted"` for anything other than LLVM intrinsics. It only makes sense in the context of calling LLVM intrinsics anyway as it exposes the way the LLVM backend internally represents types. Perhaps it should be renamed to `extern "llvm-intrinsic"`?~~

Follow up to https://github.com/rust-lang/rust/pull/148533
2026-02-12 00:41:06 -05:00
Jacob Pratt
2dba56033e
Rollup merge of #151152 - nik-contrib:helper_attr_builtin, r=chenyukang
Add FCW for derive helper attributes that will conflict with built-in attributes

Adds a future-compatibility-warning deny-by-default lint that helps catch invalid derive helper attribute names early.

This issues the lint, saying that `ignore` helper will clash with the built-in `ignore` attribute.

```rust
#![crate_type = "proc-macro"]
#![deny(ambiguous_derive_helpers)]
use proc_macro::TokenStream;

#[proc_macro_derive(Trait, attributes(ignore))]
pub fn example(input: TokenStream) -> TokenStream {
    TokenStream::new()
}
```

If you actually tried to use that `ignore` helper attribute, you won't be able to due to the ambiguity:

```rust
#[derive(Trait)]
struct Foo {
    #[ignore]
    field: (),
}
```

Produces:

```
error[E0659]: `ignore` is ambiguous
 --> src/lib.rs:5:7
  |
5 |     #[ignore]
  |       ^^^^^^ ambiguous name
  |
  = note: ambiguous because of a name conflict with a builtin attribute
  = note: `ignore` could refer to a built-in attribute
note: `ignore` could also refer to the derive helper attribute defined here
 --> src/lib.rs:3:10
  |
3 | #[derive(Trait)]
  |          ^^^^^
```
2026-02-12 00:41:06 -05:00
Jacob Pratt
0041f221ea
Rollup merge of #150768 - bjorn3:llvm_intrinsic_no_fn_abi, r=wesleywiser
Don't compute FnAbi for LLVM intrinsics in backends

~~This removes support for `extern "unadjusted"` for anything other than LLVM intrinsics. It only makes sense in the context of calling LLVM intrinsics anyway as it exposes the way the LLVM backend internally represents types. Perhaps it should be renamed to `extern "llvm-intrinsic"`?~~

Follow up to https://github.com/rust-lang/rust/pull/148533
2026-02-12 00:41:06 -05:00
Jacob Pratt
b1b6533077
Rollup merge of #142680 - beetrees:sparc64-float-struct-abi, r=tgross35
Fix passing/returning structs with the 64-bit SPARC ABI

Fixes the 64-bit SPARC part of rust-lang/rust#115609 by replacing the current implementation with a new implementation modelled on the RISC-V calling convention code ([SPARC ABI reference](https://sparc.org/wp-content/uploads/2014/01/SCD.2.4.1.pdf.gz)).

Pinging `sparcv9-sun-solaris` target maintainers: @psumbera @kulikjak
Fixes rust-lang/rust#115336
Fixes rust-lang/rust#115399
Fixes rust-lang/rust#122620
Fixes https://github.com/rust-lang/rust/issues/147883
r? @workingjubilee
2026-02-12 00:41:05 -05:00
Jacob Pratt
c509454f89
Rollup merge of #142415 - xizheyin:141679, r=estebank
Add note when inherent impl for a alias type defined outside of the crate

Fixes rust-lang/rust#141679

r? compiler
2026-02-12 00:41:05 -05:00
bors
605f49b274 Auto merge of #152506 - Urgau:rollup-MlGAszj, r=Urgau
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#152505 (Sync relnotes for stable 1.93.1)
 - rust-lang/rust#137487 (Stabilize `assert_matches`)
 - rust-lang/rust#152281 (borrowck: suggest `&mut *x` for pattern reborrows)
 - rust-lang/rust#151142 (Support ADT types in type info reflection)
 - rust-lang/rust#152477 (rustc-dev-guide subtree update)
 - rust-lang/rust#152488 (allow `deprecated(since = "CURRENT_RUSTC_VERSION")`)
 - rust-lang/rust#152491 (Remove unused `fluent-syntax` dependency from tidy)
2026-02-12 03:44:50 +00:00
arferreira
0bcec37604 Improve write! and writeln! error when called without destination 2026-02-11 20:37:45 -05:00
Urgau
452e85a0dd
Rollup merge of #152491 - JonathanBrouwer:remove-fluent-from-tidy, r=Kobzol
Remove unused `fluent-syntax` dependency from tidy
2026-02-12 00:04:17 +01:00
Urgau
f8203c657d
Rollup merge of #152488 - cyrgani:deprecation-staged-api, r=JonathanBrouwer
allow `deprecated(since = "CURRENT_RUSTC_VERSION")`

Motivated by https://github.com/rust-lang/rust/pull/149978.
2026-02-12 00:04:16 +01:00
Urgau
be697c5504
Rollup merge of #152477 - tshepang:rdg-sync, r=tshepang
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to 1a02979fae.

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

r? @ghost
2026-02-12 00:04:16 +01:00
Urgau
c87a89ed14
Rollup merge of #151142 - SpriteOvO:type-info-adt, r=oli-obk
Support ADT types in type info reflection

Tracking issue: rust-lang/rust#146922 `#![feature(type_info)]`

This PR supports ADT types for feature `type_info` reflection.
(It's still a draft PR, with implementation in progress)

Note that this PR does not take SemVer into consideration (I left a FIXME comment). As discussed earlier ([comment](https://github.com/rust-lang/rust/pull/146923#discussion_r2372249477)), this requires further discussion. However, I hope we could get an initial implementation to land first, so we can start playing with it.

### Progress / Checklist

- [x] Struct support.
- [x] Enum
- [x] Union
- [x] Generics
- [ ] ~Methods~ Implemented and to be implemented in other PRs
- [ ] ~Traits~ Implemented and to be implemented in other PRs
- [x] Rebasing PR to `main` branch
  ~~(It's currently based on PR rust-lang/rust#151123, so here's an extra commit)~~
- [x] Cleanup and Rebase.
- [x] Fix field info for references. (see [comment](https://github.com/rust-lang/rust/pull/151142#discussion_r2777920512))

r? @oli-obk
2026-02-12 00:04:15 +01:00
Urgau
050b48a693
Rollup merge of #152281 - JohnTitor:sugg-mut-deref-borrows, r=estebank
borrowck: suggest `&mut *x` for pattern reborrows

Fixes rust-lang/rust#81059
r? @estebank as you should have some context here, but feel free to re-assign if you don't have time to review right now.
2026-02-12 00:04:14 +01:00
Urgau
0de4f5bd6a
Rollup merge of #137487 - Voultapher:stabilize-assert-matches, r=Amanieu
Stabilize `assert_matches`

Closes https://github.com/rust-lang/rust/issues/82775

This is a revive of https://github.com/rust-lang/rust/pull/120234, with the suggested move from the public `assert_matches` module to `macros`. This necessitates the rename of the internal macros modules to `core_macros` and `std_macros` respectively.
2026-02-12 00:04:14 +01:00
Urgau
50d99fb8a9
Rollup merge of #152505 - cuviper:relnotes-1.93.1, r=Urgau
Sync relnotes for stable 1.93.1

These were added to the stable branch in rust-lang/rust#152450.
2026-02-12 00:04:13 +01:00
antoyo
740a55f641
Merge pull request #849 from him2him2/fix-typos
Fix typos across documentation
2026-02-11 18:02:05 -05:00
ron
dd1b72a0d8
Fix typos and grammar in documentation
- Readme.md: add missing "you" ("If don't" → "If you don't")
- Readme.md: fix wrong preposition ("without this backend" → "with this backend")
- Readme.md: fix double space
- doc/errors.md: fix transposed letters ("libgccijt" → "libgccjit")
- doc/debugging.md: remove extra word ("Run do the command" → "Run the command")
- doc/debugging.md: fix past participle ("cannot be ran" → "cannot be run")
- doc/tips.md: add missing verb ("won't a chance" → "won't have a chance")
- doc/gimple.md: fix preposition ("interested into" → "interested in")
2026-02-11 17:38:07 -05:00
antoyo
30bd49283c
Merge pull request #844 from rust-lang/sync_from_rust_2026_01_28
Sync from rust 2026/01/28
2026-02-11 17:33:53 -05:00
Josh Stone
1cb71f9d22 Sync relnotes for stable 1.93.1 2026-02-11 14:22:56 -08:00
bors
5fdff787e6 Auto merge of #152484 - matthiaskrgr:rollup-h4u26eb, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#152419 (Move more query system code)
 - rust-lang/rust#152431 (Restrict the set of things that const stability can be applied to)
 - rust-lang/rust#152436 (Reenable a GCI+mGCA+GCPT test case)
 - rust-lang/rust#152021 (Bump tvOS, visionOS and watchOS Aarch64 targets to tier 2)
 - rust-lang/rust#152146 (mGCA: Add associated const type check)
 - rust-lang/rust#152372 (style: remove unneeded trailing commas)
 - rust-lang/rust#152383 (BikeshedGuaranteedNoDrop trait: add comments indicating that it can be observed on stable)
 - rust-lang/rust#152397 (Update books)
 - rust-lang/rust#152441 (Fix typos and grammar in top-level and src/doc documentation)
2026-02-11 22:07:19 +00:00
cyrgani
52919c7f81 allow deprecated(since = "CURRENT_RUSTC_VERSION") 2026-02-11 21:39:22 +00:00
Antoni Boucher
809af1f635 Fix clippy warnings 2026-02-11 16:23:56 -05:00
Dan54
9383138801 add BinaryHeap::from_raw_vec 2026-02-11 21:18:07 +00:00
Sayantan Chakraborty
74397dcc68
Merge pull request #2020 from Snehal-Reddy/main
aarch64: Guard RCPC3 intrinsics with target_has_atomic = "64"
2026-02-11 20:40:14 +00:00
Vadim Petrochenkov
324267ccaa Partially revert "resolve: Update NameBindingData::vis in place" 2026-02-11 22:27:56 +03:00
Vadim Petrochenkov
0cd0840243 Add tests for issues 152004, 151124 and 152347 2026-02-11 22:21:22 +03:00
Manuel Drehwald
c89a89bb14 Fix multi-cgu+debug builds using autodiff by delaying autodiff till lto 2026-02-11 14:08:56 -05:00
Philipp Krones
a62c6af536
Rustup (#16551)
r? @ghost

changelog: none
2026-02-11 19:07:25 +00:00
Philipp Krones
24b1392c87
Bump nightly version -> 2026-02-11 2026-02-11 20:02:32 +01:00
Philipp Krones
c9841a63af
Merge remote-tracking branch 'upstream/master' into rustup 2026-02-11 20:02:28 +01:00
Jonathan Brouwer
ab4891ce74
Convert some impl Subdiagnostics to derives 2026-02-11 19:45:04 +01:00