Commit Graph

22589 Commits

Author SHA1 Message Date
maradini77 fc6df9cec7 fix: typos and grammar errors in README files
- fix `FIMXE`/`FXIME` typos → `FIXME`
- fix grammar: `these terminology are` → `this terminology is`
- fix apostrophe: `it's data` → `its data`
- remove duplicate word: `less less` → `less`
2025-12-25 15:11:01 +02:00
Jonathan Brouwer 77fe25a741 Rollup merge of #150311 - ChrisDenton:no-temp, r=Kivooeo
Avoid using env::temp when linking a binary

This keeps all build artefacts (even temporary ones) within the build directory.

Fixes rust-lang/rust#139963
2025-12-24 14:19:22 +01:00
bors c4aa646f15 Auto merge of #150334 - jhpratt:rollup-met2i6d, r=jhpratt
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#150016 (stabilize `lazy_get`)
 - rust-lang/rust#150139 (Correct terminology in Clone)
 - rust-lang/rust#150238 (mir_build: Classify `TestableCase::Constant` into multiple sub-kinds)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-24 09:31:51 +00:00
Jacob Pratt 1c2dbcf33b Rollup merge of #150016 - usamoi:stabilize-lazy-get, r=jhpratt
stabilize `lazy_get`

closes https://github.com/rust-lang/rust/issues/129333
FCP is finished in https://github.com/rust-lang/rust/issues/129333#issuecomment-3477510482

```@rustbot``` modify labels: +T-libs-api
2025-12-24 02:52:58 -05:00
Chris Denton 6e354544bf Rename invalid-tmpdir-env-var
to invalid-tmpdir-no-ice
2025-12-24 06:41:44 +00:00
Chris Denton b5c473e414 Avoid using env::temp when linking a binary
This keeps all build artefacts (even temporary ones) within the build directory.
2025-12-24 06:41:42 +00:00
bors efa32de15b Auto merge of #150283 - Urgau:remap-debuginfo-absolute, r=jieyouxu
Remap both absolute and relative paths when building `rustc` and `std`

Turns out [#150110](https://github.com/rust-lang/rust/issues/150110) didn't work as expected, because when the standard library sources are present, we [helpfully un-remap the paths](https://github.com/rust-lang/rust/blob/e951f470d76febcc6f0a5b409c509eb77450a336/compiler/rustc_metadata/src/rmeta/decoder.rs#L1656-L1702) to the local directory of the user, including when we are building the compiler and standard library it-self (duh!), and since those paths are absolute (not relative), our purely relative remapping didn't pick them up.

This behavior wasn't a issue before because the un-remap logic immediately tries to remap them again, and since we had the absolute remapping we would just remap them to the the same thing.

To fix that issue I've adjusted our remapping to remap both the absolute and relative paths when building `rustc` and `std`, as well as added a run-make to make sure we don't regress it again (with a new `needs-std-remap-debuginfo` directive).

r? `@jieyouxu`
2025-12-24 06:23:00 +00:00
bors 5a7ad8ee06 Auto merge of #150324 - matthiaskrgr:rollup-cl7wrqn, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#149800 (Fix ICE in normalization during closure capture analysis (rust-lang/rust#149746))
 - rust-lang/rust#150182 (Don't export upstream monomorphizations from compiler-builtins)
 - rust-lang/rust#150216 (Tidying up tests/ui/issues 15 tests [6/N])
 - rust-lang/rust#150308 (Update bors configuration)
 - rust-lang/rust#150314 (rustc-dev-guide subtree update)
 - rust-lang/rust#150319 (use new term in description of --target)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-24 03:02:44 +00:00
Matthias Krüger 2237db5d27 Rollup merge of #150319 - tshepang:triple-is-tuple, r=Kivooeo
use new term in description of --target

this changes _triple_ to _tuple_ in `--target` description
2025-12-24 00:54:37 +01:00
Matthias Krüger b6c2dab72b Rollup merge of #150216 - reddevilmidzy:t13, r=Kivooeo
Tidying up tests/ui/issues 15 tests [6/N]

> [!NOTE]
> Intermediate commits are intended to help review, but will be squashed add comment commit prior to merge.

part of rust-lang/rust#133895

r? Kivooeo
2025-12-24 00:54:36 +01:00
Matthias Krüger f6c6e847e1 Rollup merge of #149800 - Delta17920:fix-ice-149746, r=lcnr
Fix ICE in normalization during closure capture analysis (#149746)

This fixes an internal compiler error that occurred when normalizing associated types during closure capture analysis.

The Fix: Modified rustc_middle/src/ty/normalize_erasing_regions.rs to gracefully handle projection normalization failures instead of panicking when analyzing closure captures.

Regression Test: Added tests/ui/associated-types/normalization-ice-issue-149746.rs, a reproduction case involving complex associated type projections (<() as Owner>::Ty<T>) that previously crashed the compiler. Verified it now emits a standard type error (E0277).

Fixes rust-lang/rust#149746
2025-12-24 00:54:34 +01:00
bors 8796b3b8b4 Auto merge of #149114 - BoxyUwU:mgca_adt_exprs, r=lcnr
MGCA: Support struct expressions without intermediary anon consts

r? oli-obk

tracking issue: rust-lang/rust#132980

Fixes rust-lang/rust#127972
Fixes rust-lang/rust#137888
Fixes rust-lang/rust#140275

due to delaying a bug instead of ICEing in HIR ty lowering.

### High level goal

Under `feature(min_generic_const_args)` this PR adds another kind of const argument. A struct/variant construction const arg kind. We represent the values of the fields as themselves being const arguments which allows for uses of generic parameters subject to the existing restrictions present in `min_generic_const_args`:
```rust
fn foo<const N: Option<u32>>() {}

trait Trait {
    #[type_const]
    const ASSOC: usize;
}

fn bar<T: Trait, const N: u32>() {
    // the initializer of `_0` is a `N` which is a legal const argument
    // so this is ok.
    foo::<{ Some::<u32> { 0: N } }>();

    // this is allowed as mgca supports uses of assoc consts in the
    // type system. ie `<T as Trait>::ASSOC` is a legal const argument
    foo::<{ Some::<u32> { 0: <T as Trait>::ASSOC } }>();

    // this on the other hand is not allowed as `N + 1` is not a legal
    // const argument
    foo::<{ Some::<u32> { 0: N + 1 } }>();
}
```

This PR does not support uses of const ctors, e.g. `None`. And also does not support tuple constructors, e.g. `Some(N)`. I believe that it would not be difficult to add support for such functionality after this PR lands so have left it out deliberately.

We currently require that all generic parameters on the type being constructed be explicitly specified. I haven't really looked into why that is but it doesn't seem desirable to me as it should be legal to write `Some { ... }` in a const argument inside of a body and have that desugar to `Some::<_> { ... }`. Regardless this can definitely be a follow-up PR and I assume this is some underlying consistency with the way that elided args are handled with type paths elsewhere.

This PRs implementation of supporting struct expressions is somewhat incomplete. We don't handle `Foo { ..expr }` at all and aren't handling privacy/stability. The printing of `ConstArgKind::Struct` HIR nodes doesn't really exist either :')

I've tried to keep the implementation here somewhat deliberately incomplete as I think a number of these issues are actually quite small and self contained after this PR lands and I'm hoping it could be a good set of issues to mentor newer contributors on 🤔 I just wanted the "bare minimum" required to actually demonstrate that the previous changes are "necessary".

### `ValTree` now recurse through `ty::Const`

In order to actually represent struct/variant construction in `ty::Const` without going through an anon const we would need to introduce some new `ConstKind` variant. Let's say some hypothetical `ConstKind::ADT(Ty<'tcx>, List<Const<'tcx>>)`.

This variant would represent things the same way that `ValTree` does with the first element representing the `VariantIdx` of the enum (if its an enum), and then followed by a list of field values in definition order.

This *could* work but there are a few reasons why it's suboptimal.

First it would mean we have a second kind of `Const` that can be normalized. Right now we only have `ConstKind::Unevaluated` which possibly needs normalization. Similarly with `TyKind` we *only* have `TyKind::Alias`. If we introduced `ConstKind::ADT` it would need to be normalized to a `ConstKind::Value` eventually. This feels to me like it has the potential to cause bugs in the long run where only `ConstKind::Unevaluated` is handled by some code paths.

Secondly it would make type equality/inference be kind of... weird... It's desirable for `Some { 0: ?x } eq Some { 0: 1_u32 }` to result in `?x=1_u32`.  I can't see a way for this to work with this `ConstKind::ADT` design under the current architecture for how we represent types/consts and generally do equality operations.

We would need to wholly special case these two variants in type equality and have a custom recursive walker separate from the existing architecture for doing type equality. It would also be somewhat unique in that it's a non-rigid `ty::Const` (it can be normalized more later on in type inference) while also having somewhat "structural" equality behaviour.

Lastly, it's worth noting that its not *actually* `ConstKind::ADT` that we want. It's desirable to extend this setup to also support tuples and arrays, or even references if we wind up supporting those in const generics. Therefore this isn't really `ConstKind::ADT` but a more general `ConstKind::ShallowValue` or something to that effect. It represents at least one "layer" of a types value :')

Instead of doing this implementation choice we instead change `ValTree::Branch`:
```rust
enum ValTree<'tcx> {
    Leaf(ScalarInt),
    // Before this PR:
    Branch(Box<[ValTree<'tcx>]>),
    // After this PR
    Branch(Box<[Const<'tcx>]>),
}
```

The representation for so called "shallow values" is now the same as the representation for the *entire* full value. The desired inference/type equality behaviour just falls right out of this. We also don't wind up with these shallow values actually being non-rigid. And `ValTree` *already* supports references/tuples/arrays so we can handle those just fine.

I think in the future it might be worth considering inlining `ValTree` into `ty::ConstKind`. E.g:
```rust
enum ConstKind {
    Scalar(Ty<'tcx>, ScalarInt),
    ShallowValue(Ty<'tcx>, List<Const<'tcx>>),
    Unevaluated(UnevaluatedConst<'tcx>),
    ...
}
```

This would imply that the usage of `ValTree`s in patterns would now be using `ty::Const` but they already kind of are anyway and I think that's probably okay in the long run. It also would mean that the set of things we *could* represent in const patterns is greater which may be desirable in the long run for supporting things such as const patterns of const generic parameters.

Regardless, this PR doesn't actually inline `ValTree` into `ty::ConstKind`, it only changes `Branch` to recurse through `Const`. This change could be split out of this PR if desired.

I'm not sure if there'll be a perf impact from this change. It's somewhat plausible as now all const pattern values that have nesting will be interning a lot more `Ty`s. We shall see :>

### Forbidding generic parameters under mgca

Under mgca we now allow all const arguments to resolve paths to generic parameters. We then *later* actually validate that the const arg should be allowed to access generic parameters if it did wind up resolving to any.

This winds up just being a lot simpler to implement than trying to make name resolution "keep track" of whether we're inside of a non-anon-const const arg and then encounter a `const { ... }` indicating we should now stop allowing resolving to generic parameters.

It's also somewhat in line with what we'll need for a `feature(generic_const_args)` where we'll want to decide whether an anon const should have any generic parameters based off syntactically whether any generic parameters were used. Though that design is entirely hypothetical at this point :)

### Followup Work

- Make HIR ty lowering check whether lowering generic parameters is supported and if not lower to an error type/const. Should make the code cleaner, fix some other bugs, and maybe(?) recover perf since we'll be accessing less queries which I think is part of the perf regression of this PR
- Make the ValTree setup less scuffed. We should find a new name for `ConstKind::Value` and the `Val` part of `ValTree` and `ty::Value` as they no longer correspond to a fully normalized structure. It may also be worth looking into inlining `ValTreeKind` into `ConstKind` or atleast into `ty::Value` or sth 🤔
- Support tuple constructors and const constructors not just struct expressions.
- Reduce code duplication between HIR ty lowering's handling of struct expressions, and HIR typeck's handling of struct expressions
- Try fix perf https://github.com/rust-lang/rust/pull/149114#issuecomment-3668038853. Maybe this will clear up once we clean up `ValTree` a bit and stop doing double interning and whatnot
2025-12-23 23:53:55 +00:00
Tshepang Mbambo e7965821e8 use new term in description of --target 2025-12-23 23:35:58 +02:00
Boxy Uwu 484480412e Lower hir::ConstArgKind::Struct to a ValTree 2025-12-23 13:54:59 +00:00
Boxy Uwu 6722805cdc Make ValTree recurse through ty::Const 2025-12-23 13:54:59 +00:00
Boxy Uwu c65551e835 Introduce hir::ConstArgKind::Struct 2025-12-23 13:54:59 +00:00
Boxy Uwu 8f3a76bd38 mgca always resolve params 2025-12-23 13:54:59 +00:00
delta17920 ac448c987d Fix ICE in normalization during closure capture analysis 2025-12-23 12:57:47 +00:00
reddevilmidzy 4578082361 Cleaned up some tests
add comment to closure-move-use-after-move-diagnostic.rs

add comment to missing-operator-after-float.rs

add comment to closure-array-break-length.rs

add comment to box-lifetime-argument-not-allowed.rs

add comment to const-return-outside-fn.rs

add comment to drop-conflicting-impls.rs

add comment to unbalanced-doublequote-2.rs

add comment to borrow-immutable-deref-box.rs

add comment to for-in-const-eval.rs

add comment to borrowck-annotated-static-lifetime.rs

cleaned up cast-rfc0401.rs

add comment to nll-anon-to-static.rs

add comment to cast-to-dyn-any.rs

add comment to missing-associated-items.rs

add comment to enum-discriminant-missing-variant.rs
2025-12-23 21:13:24 +09:00
reddevilmidzy 7ca2eb9c6f moved test 2025-12-23 20:33:37 +09:00
Jonathan Brouwer 1c50ee1956 Rollup merge of #150282 - fee1-dead-contrib:push-tyqyzvmsmnyo, r=petrochenkov
move a ui test to coretests unit test

It only tests the usage and formatting of `fmt::Pointer`.
2025-12-23 12:01:02 +01:00
Jonathan Brouwer e156286fa5 Rollup merge of #150130 - aerooneqq:delegation-one-line-trait-impl, r=petrochenkov
Support syntax for one-line trait reuse

This PR adds support for reusing the whole trait with a one-line reuse syntax and is part of the delegation feature rust-lang/rust#118212:
```rust
trait T {
  fn foo(&self);
}

struct S;
impl T for S { ... }

struct Wrapper(S);
reuse impl T for Wrapper { self.0 }
```

The core idea is that we already have support for glob reuse, so in this scenario we want to transform one-line reuse into a trait impl block with a glob reuse in the following way:
```rust
//Before
reuse impl T for Wrapper { self.0 }

//After
impl T for Wrapper {
  reuse T::* { self.0 }
}
```

It seems like this task can be solved during parsing stage, when we encountered a one-line trait reuse, we can expand into this impl block right away, and the code which was already written to expand glob delegations will take care about the rest. We will copy trait path into glob reuse path.

The implementation of the transformation reuses already existing methods for `impl` parsing, however, we do not parse inner `impl` items, instead we parse "inner items" as delegation body. Thus, we do not have to deal with generics, consts, unsafe and other `impl` related features.

Other syntax possibility is trying to shorten one-line reuse by replacing `impl` keyword with `reuse` keyword:
```rust
reuse T for Wrapper { self.0 }
```
In this case implementation may become more complicated, and the syntax more confusing, as keywords such as `const` or `unsafe` will precede `reuse`, and there are also generics:
```rust
unsafe reuse<T1, T2> T for Wrapper { self.0 }
```

In the first (currently implemented) version reuse is placed in the beginning of the item, and it is clear that we will reuse trait implementation, while in the second, shorter version, the `reuse` keyword may be lost in generics and keywords that may precede `impl`.

r? ``@petrochenkov``
2025-12-23 12:01:01 +01:00
aerooneqq 1de1885a63 Support syntax for one-line trait reuse 2025-12-23 10:34:23 +03:00
bors 5c53093374 Auto merge of #150133 - ZuseZ4:enzyme-frontend-nightly, r=jieyouxu
remove llvm_enzyme and enzyme fallbacks from most places

Using dlopen to get symbols has the nice benefit that rustc itself doesn't depend on libenzyme symbols anymore. We can therefore delete most fallback implementations in the backend (independently of whether we enable enzyme or not). When trying to use autodiff on nightly, we will now fail with a nice error if and only if we fail to load libEnzyme-21.so in our backend.

Verified:
Build as nightly, without Enzyme
Build as nightly, with Enzyme
Build as stable (without Enzyme)

With this PR we will now run `tests/ui/autodiff` on nightly, the tests are passing.

r? `@kobzol`
2025-12-23 02:49:04 +00:00
Deadbeef 54062cff4c move a ui test to coretests unit test
It only tests the usage and formatting of `fmt::Pointer`.
2025-12-22 21:37:18 -05:00
bors 4f14395c37 Auto merge of #150284 - JonathanBrouwer:rollup-yeibc0p, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#149928 (Detail expectation on non-`()` block tail in `if` then condition with no `else`)
 - rust-lang/rust#150166 (Don't lint on interior mutable `const` item coming from derefs)
 - rust-lang/rust#150281 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-22 20:09:56 +00:00
Jonathan Brouwer a65fa4a357 Rollup merge of #150166 - Urgau:const-item-lint-150157, r=Kivooeo
Don't lint on interior mutable `const` item coming from derefs

This PR fixes the `const_item_interior_mutations` lint so we don't lint on interior mutable `const` item coming from derefs.

Fixes https://github.com/rust-lang/rust/issues/150157
2025-12-22 20:11:54 +01:00
Jonathan Brouwer 9175089439 Rollup merge of #149928 - estebank:if-no-else, r=fee1-dead
Detail expectation on non-`()` block tail in `if` then condition with no `else`

When encountering an `if` expression with no `else` where the then block has a tail expression, we emit an E0308 type error. We now explain why `()` was expected.

Partially address rust-lang/rust#144911.
2025-12-22 20:11:53 +01:00
Urgau 4d839da22b Remap both absolute and relative paths when building rustc and std 2025-12-22 19:44:13 +01:00
Jonathan Brouwer 520a3c41cd Rollup merge of #150155 - Aditya-PS-05:fix/ice-150103-root-in-suggestions, r=estebank
fix ICE when {{root}} appears in import suggestions

Fixes rust-lang/rust#150103

When wrong nested imports like `use A::{::Fish}` were used, the internal {{root}} would appear in diagnostic suggestions, causing an ICE in `join_path_idents` which asserted that **{{root}} should only appear at the start of a path**.

r? ``@matthiaskrgr``
2025-12-22 17:33:37 +01:00
Esteban Küber 42ec5c7b32 Detail expectation on non-() block tail in if then condition with no else
When encountering an `if` expression with no `else` where the then
block has a tail expression, we emit an E0308 type error. We now explain
why `()` was expected.
2025-12-22 13:55:49 +00:00
bors e951f470d7 Auto merge of #150240 - JonathanBrouwer:rollup-anx8c35, r=JonathanBrouwer
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#149840 (Update comment for `STAGE0_MISSING_TARGETS`)
 - rust-lang/rust#150109 (crash test readme: point to rustc-dev-guide)
 - rust-lang/rust#150204 (Port `#[cfi_encoding]` to attribute parser)
 - rust-lang/rust#150237 (Skip tidy target-specific check for `run-make-cargo` too)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-22 10:45:04 +00:00
Jonathan Brouwer d31a2bedfb Rollup merge of #150204 - Bryntet:parse_cfi_encoding, r=JonathanBrouwer
Port `#[cfi_encoding]` to attribute parser

The error message is kind of saying the same thing twice, would like input on which .expect function I should use instead to not have it be double, otherwise this passes all tests locally where this attribute is used

r? `@JonathanBrouwer`
2025-12-22 07:58:49 +01:00
Jonathan Brouwer 43f270a0ef Rollup merge of #150109 - tshepang:patch-1, r=jieyouxu
crash test readme: point to rustc-dev-guide

There is information that is duplicated here and in rustc-dev-guide, and the latter is more comprehensive, so point there.
2025-12-22 07:58:48 +01:00
bors 000ccd651d Auto merge of #148766 - cjgillot:mir-const-runtime-checks, r=RalfJung,saethlin
Replace Rvalue::NullaryOp by a variant in mir::Operand.

Based on https://github.com/rust-lang/rust/pull/148151

This PR fully removes the MIR `Rvalue::NullaryOp`. After rust-lang/rust#148151, it was only useful for runtime checks like `ub_checks`, `contract_checks` and `overflow_checks`.

These are "runtime" checks, boolean constants that may only be `true` in codegen. It depends on a rustc flag passed to codegen, so we need to represent those flags cross-crate.

This PR replaces those runtime checks by special variants in MIR `ConstValue`. This allows code that expects constants to manipulate those as such, even if we may not always be able to evaluate them to actual scalars.
2025-12-22 06:58:28 +00:00
bors acfd264f4d Auto merge of #150228 - matthiaskrgr:rollup-ymp54q0, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#146377 (Don't strip shebang in expr-ctxt `include!(…)`)
 - rust-lang/rust#149812 (Add const default for OnceCell and OnceLock)
 - rust-lang/rust#149882 (miri: add -Zbinary-dep-depinfo to dependency builds)
 - rust-lang/rust#150009 (Enable llvm-libunwind by default for Hexagon targets)
 - rust-lang/rust#150035 (fix docustring on fetch_or)
 - rust-lang/rust#150082 (tests/ui/traits/fmt-pointer-trait.rs: Add HRTB fn pointer case)
 - rust-lang/rust#150160 (Fix ICE (rust-lang/rust#149980) for invalid EII in statement position)
 - rust-lang/rust#150184 (mir_build: Use the same length type for `TestableCase::Slice` and `TestKind::Len`)
 - rust-lang/rust#150185 ([rustdoc] Add missing close tags in extern crate reexports)
 - rust-lang/rust#150191 (change non-canonical clone impl to {*self}, fix some doc comments)
 - rust-lang/rust#150203 (Drop the From derive macro from the v1 prelude)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-22 01:58:47 +00:00
Edvin Bryntesson d719a49b28 Port #[cfi_encoding] to attribute parser 2025-12-21 22:11:33 +01:00
Jonathan Brouwer e0dba518b5 Rollup merge of #150221 - el-ev:missing-par-ice-150154, r=fmease
rustdoc: handle macro expansions in types

- Closes rust-lang/rust#150154.
- Closes rust-lang/rust#150197.

This PR implements `visit_ty` in `ExpandedCodeVisitor` to correctly handle macro expansions in type positions (e.g., `let _: foo!();`). This also fixes a crash in rustdoc caused by the same issue.

Before:
<img width="419" height="182" alt="image" src="https://github.com/user-attachments/assets/89627230-032d-4ba1-af2e-8aa9a9cc6627" />
After:
<img width="288" height="107" alt="image" src="https://github.com/user-attachments/assets/c06caeda-28b7-45b8-845a-e7fe784a82e4" />
2025-12-21 21:16:35 +01:00
Jonathan Brouwer 0177e98a6d Rollup merge of #150210 - Enselic:run-mir-pass, r=saethlin
tests/debuginfo/function-arg-initialization.rs: Stop disabling SingleUseConsts MIR pass

This test passes locally for me. Let's see if it passes CI too.

Discovered while I worked on https://github.com/rust-lang/rust/pull/150201.

CC rust-lang/rust#128945
2025-12-21 21:16:34 +01:00
Matthias Krüger d107e95043 Rollup merge of #150185 - lambda:rustdoc-missing-close-tags-reexport, r=GuillaumeGomez
[rustdoc] Add missing close tags in extern crate reexports

Fixes rust-lang/rust#150176
2025-12-21 18:50:45 +01:00
Matthias Krüger 5e365fd9de Rollup merge of #150160 - jdonszelmann:fix-149980, r=Kivooeo
Fix ICE (#149980) for invalid EII in statement position

Based on https://github.com/rust-lang/rust/pull/150159

Fixes rust-lang/rust#149980
2025-12-21 18:50:44 +01:00
Matthias Krüger d1cf7f8e61 Rollup merge of #146377 - fmease:no-incl-shebang-expr, r=Urgau
Don't strip shebang in expr-ctxt `include!(…)`

No longer strip shebang interpreter directives in files that were `include`d in expression (statement) contexts.
2025-12-21 18:50:40 +01:00
Iris Shi 74af408790 rustdoc: handle macro expansions in types 2025-12-21 23:23:17 +08:00
bors d3f16d2f35 Auto merge of #149437 - ilammy:patch-1, r=Mark-Simulacrum
Fix trailing newline in JUnit formatter

`write_message()` expects messages to contain no newlines.

Fixes https://github.com/rust-lang/rust/issues/149436
2025-12-21 10:37:51 +00:00
Brian Campbell 685e4b6d02 Add comment with link to issue and open tags 2025-12-21 00:57:46 -05:00
Camille Gillot c67b99fa09 Reinstate bonus for unused UbChecks. 2025-12-21 00:58:00 +00:00
bors cb79c42008 Auto merge of #148329 - LorrensP-2158466:closure-prop, r=lcnr
Better closure requirement propagation.

Fixes rust-lang/rust#148289
Fixes rust-lang/rust#104477
Should unblock rust-lang/rust#148187

When propagating closure requirements we:
- no longer try to find a post dominiting region for the list of non-local lower bounds of `longer_fr`.
- we filter the list of `longer_fr-: shorter_fr+` to only these constraints between external regions which are required regardless. If no such constraint exists, we fall back to propagating all of them.

See the [FCP](https://github.com/rust-lang/rust/pull/148329#issuecomment-3581019253) for more information.

r? `@lcnr`
2025-12-20 21:05:32 +00:00
Martin Nordholts b7a0f84a5a tests/debuginfo/function-arg-initialization.rs: Stop disabling SingleUseConsts MIR pass 2025-12-20 20:35:30 +01:00
bors 24139cf844 Auto merge of #150199 - JonathanBrouwer:rollup-pjxlhel, r=JonathanBrouwer
Rollup of 2 pull requests

Successful merges:

 - rust-lang/rust#150188 (Dogfood `strip_circumfix`)
 - rust-lang/rust#150198 (Port `#[thread_local]` to attribute parser)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-20 16:01:33 +00:00
Brian Campbell c556e9c2fa [rustdoc] Add missing close tags in extern crate reexports 2025-12-20 10:31:01 -05:00