Commit graph

312989 commits

Author SHA1 Message Date
Jana Dönszelmann
f4fd8a0633
experiment query caching 2025-12-12 11:32:35 +01:00
Jana Dönszelmann
3cf74cb2a4
disable gcc for now 2025-12-12 11:32:32 +01:00
Jana Dönszelmann
f7e453e2fa
visibility using std_internal_symbol 2025-12-12 11:32:31 +01:00
Jana Dönszelmann
9bd6b7ff72
EII: generate aliases for implementations 2025-12-12 11:32:29 +01:00
Jana Dönszelmann
a63f10a827
EII liveness analysis 2025-12-12 11:32:28 +01:00
Jana Dönszelmann
a4abfad99b
EII new error code 2025-12-12 11:32:26 +01:00
Jana Dönszelmann
230ad7f639
fix problems with type checking 2025-12-12 11:28:58 +01:00
Jana Dönszelmann
8dfb2cdece
EII type checking 2025-12-12 11:28:58 +01:00
Jana Dönszelmann
b732030025
make EII iteration faster 2025-12-12 11:28:58 +01:00
Jana Dönszelmann
1cbdaf246b
EII collection queries
EII collection queries
2025-12-12 11:28:58 +01:00
Jana Dönszelmann
33df6ccb21
EII lowering 2025-12-12 11:28:58 +01:00
Jana Dönszelmann
59d50cd2ad
EII nameres changes 2025-12-12 11:17:33 +01:00
Jana Dönszelmann
3d38d9fdba
EII add feature gate 2025-12-12 11:17:33 +01:00
Jana Dönszelmann
92c03a26fd
EII (builtin) macros in std 2025-12-12 11:17:33 +01:00
Jana Dönszelmann
2de02ac86e
EII ast changes 2025-12-12 11:17:33 +01:00
Jana Dönszelmann
615acd8b4d
add tests for using a single impl for two EIIs 2025-12-12 11:17:32 +01:00
Jana Dönszelmann
be98443639
TEMP: fixes error codes in non-codegen tests. those work after the type checking 2025-12-12 11:17:32 +01:00
Jana Dönszelmann
0ac215aabe
EII tests 2025-12-12 11:17:32 +01:00
bors
c4dc70ee0a Auto merge of #149891 - matthiaskrgr:rollup-jh6xrhz, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#142380 (Put negative implementors first and apply same ordering logic to foreign implementors)
 - rust-lang/rust#146584 (remove duplicated columns from `rustc_error_code::error_codes!`)
 - rust-lang/rust#148717 (Point at span within local macros even when error happens in nested external macro)
 - rust-lang/rust#149565 (rustdoc: Add unstable `--merge-doctests=yes/no/auto` flag)
 - rust-lang/rust#149770 (Rename some issue-* tests)
 - rust-lang/rust#149807 (Use ubuntu:24.04 for the `x86_64-gnu-miri` job)
 - rust-lang/rust#149850 (Remove "tidy" tool for `tests/rustdoc` testsuite)
 - rust-lang/rust#149863 (Do not suggest moving expression out of for loop when hitting `break` from desugaring)
 - rust-lang/rust#149867 (only resolve main in bin crates)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-12 06:30:06 +00:00
Matthias Krüger
1c937f1e7f
Rollup merge of #149867 - 21aslade:lib-crate-main, r=Kivooeo
only resolve main in bin crates

Fixes rust-lang/rust#149412
2025-12-11 22:09:58 +01:00
Matthias Krüger
eb309e5182
Rollup merge of #149863 - estebank:issue-149861, r=mati865
Do not suggest moving expression out of for loop when hitting `break` from desugaring

Fix rust-lang/rust#149861.
2025-12-11 22:09:58 +01:00
Matthias Krüger
b912391535
Rollup merge of #149850 - GuillaumeGomez:rm-tidy-rustdoc, r=yotamofek
Remove "tidy" tool for `tests/rustdoc` testsuite

As discussed in the [last rustdoc meeting](https://rust-lang.zulipchat.com/#narrow/channel/393423-t-rustdoc.2Fmeetings/topic/2025-12-08/near/562554410), it seems like the current `tidy` tool is not used much for the `rustdoc` testsuite by the rustdoc contributors as it doesn't fit nicely our needs.

Until we find something better, we decided to remove it.

r? ```@yotamofek```
2025-12-11 22:09:56 +01:00
Matthias Krüger
817c58a975
Rollup merge of #149807 - Kobzol:miri-ubuntu-24.04, r=marcoieni
Use ubuntu:24.04 for the `x86_64-gnu-miri` job

Ralf asked for this in https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Adding.20a.20C.2B.2B.20dependency.20to.20Miri.3F/with/560654845.
2025-12-11 22:09:55 +01:00
Matthias Krüger
17940e27c8
Rollup merge of #149770 - GrigorenkoPV:tests/consts, r=WaffleLapkin
Rename some issue-* tests

Also fixes one incorrect issue number: https://github.com/rust-lang/rust/pull/100168#issuecomment-3622946835
2025-12-11 22:09:54 +01:00
Matthias Krüger
0dfc23839b
Rollup merge of #149565 - jyn514:force-doctest-merge, r=notriddle
rustdoc: Add unstable `--merge-doctests=yes/no/auto` flag

This is useful for changing the *default* for whether doctests are merged or not. Currently, that default is solely controlled by `edition = 2024`, which adds a high switching cost to get doctest merging. This flag allows opting in even on earlier editions.

Unlike the `edition = 2024` default, `--merge-doctests=yes` gives a hard error if merging fails instead of falling back to running standalone tests. The user has explicitly said they want merging, so we shouldn't silently do something else.

`--merge-doctests=auto` is equivalent to the current 2024 edition behavior, but available on earlier editions.

Helps with https://github.com/rust-lang/rust/issues/141240. ``@epage`` said in that issue he would like a per-doctest opt-in, and that seems useful to me in addition to this flag, but I think it's a separate use case from changing the default.
2025-12-11 22:09:54 +01:00
Matthias Krüger
215d7b661e
Rollup merge of #148717 - estebank:macro-spans-2, r=petrochenkov
Point at span within local macros even when error happens in nested external macro

Address issue noticed at https://users.rust-lang.org/t/error-message-does-not-specify-where-in-macro/135157/1. On errors occurring within a macro expansion, point at the innermost local macro expansion point.

```
error[E0308]: mismatched types
  --> $DIR/macro-span-caller-replacement.rs:5:17
   |
LL |             s = format!("{arg}");
   |                 ^^^^^^^^^^^^^^^^ expected `&str`, found `String`
...
LL |     macro_with_format!();
   |     -------------------- in this macro invocation
   |
   = note: this error originates in the macro `format` which comes from the expansion of the macro `macro_with_format` (in Nightly builds, run with -Z macro-backtrace for more info)
```
2025-12-11 22:09:53 +01:00
Matthias Krüger
bf399241fe
Rollup merge of #146584 - cyrgani:error-codes-macro, r=GuillaumeGomez
remove duplicated columns from `rustc_error_code::error_codes!`

Possible because of rust-lang/rust#146308 ~~, but currently still blocked on the next stage0 bump~~.
2025-12-11 22:09:52 +01:00
Matthias Krüger
52cadc06f1
Rollup merge of #142380 - GuillaumeGomez:neg-implementors, r=yotamofek
Put negative implementors first and apply same ordering logic to foreign implementors

Fixes rust-lang/rust#51129.

This PR changeda surprisingly small amount of things to put negative trait impls before the others: basically just adding a new information in the generated JS file for foreign implementors and a "negative marker" DOM element to know where to insert negative impls.

I also used this occasion to make the foreign implementors sort the same as the local ones by using `compare_names`.

You can test it [here](https://rustdoc.crud.net/imperio/neg-implementors/core/marker/trait.Sync.html#implementors).

r? ```@notriddle```
2025-12-11 22:09:51 +01:00
bors
5b150d238f Auto merge of #149645 - GuillaumeGomez:doc-attr-based, r=jdonszelmann,jonathanbrouwer
Port `doc` attributes to new attribute API

Part of https://github.com/rust-lang/rust/issues/131229.

This PR ports the `doc` attributes to the new attribute API. However, there are things that will need to be fixed in a follow-up:

* Some part of `cfg_old.rs` are likely unused now, so they should be removed.
* Not all error/lints are emitted at the same time anymore, making them kinda less useful considering that you need to run and fix rustc/rustdoc multiple times to get through all of them.
* For coherency with the other attribute errors, I didn't modify the default output too much, meaning that we have some new messages now. I'll likely come back to that to check if the previous ones were better in a case-by-case approach.
* `doc(test(attr(...)))` is handled in a horrifying manner currently. Until we can handle it correctly with the `Attribute` system, it'll remain that thing we're all very ashamed of. 😈
* A type in rustdoc got its size increased, I'll check the impact on performance. But in any case, I plan to improve it in a follow-up so should be "ok".
* Because of error reporting, some fields of `Doc` are suboptimal, like `inline` which instead of being an `Option` is a `ThinVec` because we report the error later on. Part of the things I'm not super happy about but can be postponed to future me.
* In `src/librustdoc/clean/cfg.rs`, the `pub(crate) fn parse(cfg: &MetaItemInner) -> Result<Cfg, InvalidCfgError> {` function should be removed once `cfg_trace` has been ported to new `cfg` API.
* Size of type `DocFragment` went from 32 to 48. Would be nice to get it back to 32.
* ``malformed `doc` attribute input`` wasn't meant for so many candidates, should be improved.
* See how many of the checks in `check_attr` we can move to attribute parsing
* Port target checking to be in the attribute parser completely
* Fix target checking for `doc(alias)` on fields & patterns

And finally, once this PR is merged, I plan to finally stabilize `doc_cfg` feature. :)

cc `@jdonszelmann`
r? `@JonathanBrouwer`
2025-12-11 21:08:19 +00:00
Esteban Küber
c60ed211d1 Do not suggest moving expression out of for loop when hitting break from desugaring 2025-12-11 15:00:48 +00:00
Guillaume Gomez
51806323f9 Do not error if there are duplicated doc attributes 2025-12-11 01:35:28 +01:00
21aslade
c27bcef6f8 don't resolve main in lib crates 2025-12-10 14:17:47 -07:00
bors
f520900083 Auto merge of #149853 - matthiaskrgr:rollup-m2rkwqr, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#148052 (Stabilize `const_mul_add`)
 - rust-lang/rust#149386 (Display funding link in the github overview)
 - rust-lang/rust#149489 (Experimentally add *heterogeneous* `try` blocks)
 - rust-lang/rust#149764 (Make `--print=backend-has-zstd` work by default on any backend)
 - rust-lang/rust#149838 (Build auxiliary in pretty tests)
 - rust-lang/rust#149839 (Use `PointeeSized` bound for `TrivialClone` impls)
 - rust-lang/rust#149846 (Statically require links to an issue or the edition guide for all FCWs)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-10 20:12:15 +00:00
Esteban Küber
1bd7934d89 Point at span within local macros even when error happens in nested external macro
```
error[E0308]: mismatched types
  --> $DIR/macro-span-caller-replacement.rs:5:17
   |
LL |             s = format!("{arg}");
   |                 ^^^^^^^^^^^^^^^^ expected `&str`, found `String`
...
LL |     macro_with_format!();
   |     -------------------- in this macro invocation
   |
   = note: this error originates in the macro `format` which comes from the expansion of the macro `macro_with_format` (in Nightly builds, run with -Z macro-backtrace for more info)
```
2025-12-10 19:27:40 +00:00
Esteban Küber
507b67f457 Add test for incorrect macro span replacement 2025-12-10 19:21:32 +00:00
Guillaume Gomez
2bc2a0db69 For now, ignore target checking for doc attributes in attr_parsing 2025-12-10 20:18:42 +01:00
Pavel Grigorenko
96a7000101 Rename some issue-* tests 2025-12-10 20:31:10 +03:00
bors
a9ac706b5f Auto merge of #149535 - Jamesbarford:chore/refactor-struct-placeholder, r=lcnr
Move `struct Placeholder<T>`

r? ghost

Couple of issues I've encountered;
- `compiler/rustc_infer/src/infer/region_constraints/mod.rs` `GenericKind` I can't call `write!(f, "{p}")` due to error 1. Which looks like I may need to implement `Lift` for `Placeholder`?
- Using the `define_print_and_forward_display!` for `ty::PlaceholderType` caused error 2, as I've moved the struct it no longer exists in the crate. I suspect because I'm not using that macro it causes the error for `GenericKind`

<details>
<summary>Error 1</summary>

```
error: lifetime may not live long enough
   --> compiler/rustc_infer/src/infer/region_constraints/mod.rs:672:38
    |
668 | impl<'tcx> fmt::Display for GenericKind<'tcx> {
    |      ---- lifetime `'tcx` defined here
...
672 |             GenericKind::Placeholder(ref p) => write!(f, "{p}"),
    |                                      ^^^^^ assignment requires that `'tcx` must outlive `'static`
    |
    = note: requirement occurs because of the type `rustc_middle::ty::TyCtxt<'_>`, which makes the generic argument `'_` invariant
    = note: the struct `rustc_middle::ty::TyCtxt<'tcx>` is invariant over the parameter `'tcx`
    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance

error: implementation of `Lift` is not general enough
   --> compiler/rustc_infer/src/infer/region_constraints/mod.rs:672:38
    |
672 |             GenericKind::Placeholder(ref p) => write!(f, "{p}"),
    |                                      ^^^^^ implementation of `Lift` is not general enough
    |
    = note: `Lift<rustc_middle::ty::TyCtxt<'0>>` would have to be implemented for the type `rustc_type_ir::Placeholder<rustc_middle::ty::TyCtxt<'_>, BoundTy>`, for any lifetime `'0`...
    = note: ...but `Lift<rustc_middle::ty::TyCtxt<'1>>` is actually implemented for the type `rustc_type_ir::Placeholder<rustc_middle::ty::TyCtxt<'1>, BoundTy>`, for some specific lifetime `'1`

error: implementation of `Print` is not general enough
   --> compiler/rustc_infer/src/infer/region_constraints/mod.rs:672:38
    |
672 |             GenericKind::Placeholder(ref p) => write!(f, "{p}"),
    |                                      ^^^^^ implementation of `Print` is not general enough
```

</details>

<details>
<summary>Error 2</summary>

```
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
    --> compiler/rustc_middle/src/ty/print/pretty.rs:3060:38
     |
3057 | / macro_rules! forward_display_to_print {
3058 | |     ($($ty:ty),+) => {
3059 | |         // Some of the $ty arguments may not actually use 'tcx
3060 | |         $(#[allow(unused_lifetimes)] impl<'tcx> fmt::Display for $ty {
     | |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...    |
3072 | |     };
3073 | | }
     | |_- in this expansion of `forward_display_to_print!`
...
3093 | / forward_display_to_print! {
3094 | |     ty::Region<'tcx>,
3095 | |     Ty<'tcx>,
3096 | |     &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
3097 | |     ty::Const<'tcx>,
3098 | |     &'tcx ty::PlaceholderType<'tcx>
     | |     ------------------------------- `rustc_type_ir::Placeholder` is not defined in the current crate
3099 | | }
     | |_- in this macro invocation
     |
     = note: impl doesn't have any local type before any uncovered type parameters
     = note: for more information see https://doc.rust-lang.org/reference/items/implementations.html#orphan-rules
     = note: define and implement a trait or new type instead

error: implementation of `Lift` is not general enough
    --> compiler/rustc_middle/src/ty/print/pretty.rs:3060:38
     |
3057 | / macro_rules! forward_display_to_print {
3058 | |     ($($ty:ty),+) => {
3059 | |         // Some of the $ty arguments may not actually use 'tcx
3060 | |         $(#[allow(unused_lifetimes)] impl<'tcx> fmt::Display for $ty {
     | |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Lift` is not general enough
...    |
3072 | |     };
3073 | | }
     | |_- in this expansion of `forward_display_to_print!`
...
3093 | / forward_display_to_print! {
3094 | |     ty::Region<'tcx>,
3095 | |     Ty<'tcx>,
3096 | |     &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
3097 | |     ty::Const<'tcx>,
3098 | |     &'tcx ty::PlaceholderType<'tcx>
3099 | | }
     | |_- in this macro invocation
     |
     = note: `Lift<context::TyCtxt<'0>>` would have to be implemented for the type `rustc_type_ir::Placeholder<context::TyCtxt<'tcx>, BoundTy>`, for any lifetime `'0`...
     = note: ...but `Lift<context::TyCtxt<'1>>` is actually implemented for the type `rustc_type_ir::Placeholder<context::TyCtxt<'1>, BoundTy>`, for some specific lifetime `'1`

error: implementation of `print::Print` is not general enough
    --> compiler/rustc_middle/src/ty/print/pretty.rs:3060:38
     |
3057 | / macro_rules! forward_display_to_print {
3058 | |     ($($ty:ty),+) => {
3059 | |         // Some of the $ty arguments may not actually use 'tcx
3060 | |         $(#[allow(unused_lifetimes)] impl<'tcx> fmt::Display for $ty {
     | |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `print::Print` is not general enough
...    |
3072 | |     };
3073 | | }
     | |_- in this expansion of `forward_display_to_print!`
...
3093 | / forward_display_to_print! {
3094 | |     ty::Region<'tcx>,
3095 | |     Ty<'tcx>,
3096 | |     &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
3097 | |     ty::Const<'tcx>,
3098 | |     &'tcx ty::PlaceholderType<'tcx>
3099 | | }
     | |_- in this macro invocation
     |
     = note: `print::Print<'0, print::pretty::FmtPrinter<'a, '0>>` would have to be implemented for the type `rustc_type_ir::Placeholder<context::TyCtxt<'tcx>, BoundTy>`, for any lifetime `'0`...
     = note: ...but `print::Print<'1, print::pretty::FmtPrinter<'a, 'tcx>>` is actually implemented for the type `rustc_type_ir::Placeholder<context::TyCtxt<'1>, BoundTy>`, for some specific lifetime `'1`

error: specializing impl repeats parameter `'tcx`
    --> compiler/rustc_middle/src/ty/print/pretty.rs:3060:38
     |
3057 | / macro_rules! forward_display_to_print {
3058 | |     ($($ty:ty),+) => {
3059 | |         // Some of the $ty arguments may not actually use 'tcx
3060 | |         $(#[allow(unused_lifetimes)] impl<'tcx> fmt::Display for $ty {
     | |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...    |
3072 | |     };
3073 | | }
     | |_- in this expansion of `forward_display_to_print!`
...
3093 | / forward_display_to_print! {
3094 | |     ty::Region<'tcx>,
3095 | |     Ty<'tcx>,
3096 | |     &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
3097 | |     ty::Const<'tcx>,
3098 | |     &'tcx ty::PlaceholderType<'tcx>
3099 | | }
     | |_- in this macro invocation

error[E0277]: the trait bound `&Placeholder<TyCtxt<'tcx>, BoundTy>: Lift<...>` is not satisfied
    --> compiler/rustc_middle/src/ty/print/pretty.rs:3064:30
     |
3057 | / macro_rules! forward_display_to_print {
3058 | |     ($($ty:ty),+) => {
3059 | |         // Some of the $ty arguments may not actually use 'tcx
3060 | |         $(#[allow(unused_lifetimes)] impl<'tcx> fmt::Display for $ty {
...    |
3064 | |                     tcx.lift(*self)
     | |                         ---- ^^^^^ unsatisfied trait bound
     | |                         |
     | |                         required by a bound introduced by this call
...    |
3072 | |     };
3073 | | }
     | |_- in this expansion of `forward_display_to_print!`
...
3093 | / forward_display_to_print! {
3094 | |     ty::Region<'tcx>,
3095 | |     Ty<'tcx>,
3096 | |     &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
3097 | |     ty::Const<'tcx>,
3098 | |     &'tcx ty::PlaceholderType<'tcx>
3099 | | }
     | |_- in this macro invocation
     |
     = help: the trait `Lift<context::TyCtxt<'_>>` is not implemented for `&rustc_type_ir::Placeholder<context::TyCtxt<'tcx>, BoundTy>`
note: required by a bound in `context::TyCtxt::<'tcx>::lift`
    --> compiler/rustc_middle/src/ty/context.rs:1807:20
     |
1807 |     pub fn lift<T: Lift<TyCtxt<'tcx>>>(self, value: T) -> Option<T::Lifted> {
     |                    ^^^^^^^^^^^^^^^^^^ required by this bound in `TyCtxt::<'tcx>::lift`
     = note: the full name for the type has been written to '/home/jambar02/Documents/arm/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_middle-16e5c44041028d8b.long-type-3843651570422266958.txt'
     = note: consider using `--verbose` to print the full type name to the console
help: consider dereferencing here
     |
3064 |                     tcx.lift(**self)
     |                              +

error[E0282]: type annotations needed
    --> compiler/rustc_middle/src/ty/print/pretty.rs:3064:21
     |
3057 | /  macro_rules! forward_display_to_print {
3058 | |      ($($ty:ty),+) => {
3059 | |          // Some of the $ty arguments may not actually use 'tcx
3060 | |          $(#[allow(unused_lifetimes)] impl<'tcx> fmt::Display for $ty {
...    |
3064 | |/                     tcx.lift(*self)
3065 | ||                         .expect("could not lift for printing")
     | ||______________________________________________________________^ cannot infer type
...    |
3072 | |      };
3073 | |  }
     | |__- in this expansion of `forward_display_to_print!`
...
3093 |  / forward_display_to_print! {
3094 |  |     ty::Region<'tcx>,
3095 |  |     Ty<'tcx>,
3096 |  |     &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
3097 |  |     ty::Const<'tcx>,
3098 |  |     &'tcx ty::PlaceholderType<'tcx>
3099 |  | }
     |  |_- in this macro invocation
```

</details>
2025-12-10 17:00:22 +00:00
Jakub Beránek
40891c79e6
Use ubuntu:24.04 for the x86_64-gnu-miri and x86_64-gnu-aux jobs 2025-12-10 17:50:35 +01:00
Guillaume Gomez
fb9d3a5db4 Simplify the sorting of impls and use CSS classes instead of plain JS to show/hide implementors 2025-12-10 17:42:29 +01:00
Matthias Krüger
eab103688f
Rollup merge of #149846 - jdonszelmann:links-for-all-fcws, r=wafflelapkin
Statically require links to an issue or the edition guide for all FCWs

r? `@wafflelapkin`
2025-12-10 17:16:50 +01:00
Matthias Krüger
03028df750
Rollup merge of #149839 - theemathas:trivial-clone-pointee-sized, r=joboet
Use `PointeeSized` bound for `TrivialClone` impls

These `TrivialClone` impls previously had `?Sized` bounds, which are different from the `PointeeSized` bounds on the corresponding `Clone` and `Copy` impls. So, I've changed the `?Sized` bounds into `PointeeSized` bounds.

This mistake was made presumably because the `TrivialClone` PR (https://github.com/rust-lang/rust/pull/135634) was opened in Jan 2025, but merged in Nov 2025. During that time, the sized hierachy PR (https://github.com/rust-lang/rust/pull/137944) was opened in Mar 2025, and merged in Jun 2025. The `TrivialClone` PR was not updated to account for the sized hierachy changes.

r? `@joboet`
2025-12-10 17:16:50 +01:00
Matthias Krüger
7b2f36e7ac
Rollup merge of #149838 - aerooneqq:build-aux-in-pp-tests, r=petrochenkov
Build auxiliary in pretty tests

I've encountered a problem with building auxiliary in pretty tests with the following configuration:
```
//@ edition:2021
//@ aux-crate:to_reuse_functions=to-reuse-functions.rs
//@ pretty-mode:hir
//@ pretty-compare-only
//@ pp-exact:delegation-inherit-attributes.pp
```

In such kind of tests, I want to test the resulting HIR, without final typecheck (`pretty-compare-only`). I plan to use such tests during testing the attribute inheritance in delegation feature. However, related auxiliary is built only in [self.typecheck_source](2e667b0c64/src/tools/compiletest/src/runtest/pretty.rs (L79)) method (in `compose_and_run_compiler` routine), so it is impossible to execute test in my scenario. As a solution I've added the auxiliary build in [print_source](2e667b0c64/src/tools/compiletest/src/runtest.rs (L434)) method, so it is also built in a compare only scenarios.

I've tried to search other solutions to this problem, but I haven't found a way to force auxiliary build in such a configuration of a pretty test.

r? `@petrochenkov`
2025-12-10 17:16:48 +01:00
Matthias Krüger
d1e921e854
Rollup merge of #149764 - Zalathar:has-zstd, r=bjorn3
Make `--print=backend-has-zstd` work by default on any backend

Using a defaulted `CodegenBackend` method that querying for zstd support should automatically print a safe value of `false` on any backend that doesn't specifically indicate the presence or absence of zstd.

This should fix the compiletest failures reported in https://github.com/rust-lang/rust/pull/149666#discussion_r2597881482, which can occur when LLVM is not the default codegen backend.
2025-12-10 17:16:48 +01:00
Matthias Krüger
02a58a9bee
Rollup merge of #149489 - scottmcm:try-bikeshed, r=nnethercote
Experimentally add *heterogeneous* `try` blocks

rust-lang/rust#148725 moved the default to being homogeneous; this adds heterogeneous ones back under an obvious-bikeshed syntax so people can experiment with that as well.

Essentially resolves rust-lang/rust#149025 by letting them move to this syntax instead.

New tracking issue: rust-lang/rust#149488
Related RFC: https://github.com/rust-lang/rfcs/pull/3721#issuecomment-3208342727 (specifically about experimenting)
2025-12-10 17:16:47 +01:00
Matthias Krüger
54195b964a
Rollup merge of #149386 - WaffleLapkin:display-funding, r=Kobzol
Display funding link in the github overview

This should be coordinated with https://github.com/rust-lang/blog.rust-lang.org/pull/1751.

cc `@Kobzol`
2025-12-10 17:16:47 +01:00
Matthias Krüger
26ae47502a
Rollup merge of #148052 - tgross35:stabilize-const_mul_add, r=RalfJung
Stabilize `const_mul_add`

Newly stable API:

```rust
impl {f32, f64} {
    pub const fn mul_add(self, a: Self, b: Self) -> Self;
}
```

This includes making the intrinsics `fmaf{16,32,64,128}` const stable for indirect use, matching similar intrinsics.

Closes: https://github.com/rust-lang/rust/issues/146724
2025-12-10 17:16:46 +01:00
Jana Dönszelmann
183048c83e
update docs 2025-12-10 16:34:16 +01:00
Guillaume Gomez
13091ddc93 Make implementors list visible only when filled 2025-12-10 16:18:22 +01:00
Guillaume Gomez
985178dacf Add GUI test to ensure that negative impls are correctly sorted 2025-12-10 16:18:22 +01:00