Commit Graph

3888 Commits

Author SHA1 Message Date
Roland Xu
af2ca5267d Rollup merge of #163170 - mejrs:hir_imports, r=oli-obk
Update deprecated rustc_hir imports

Followup to https://github.com/rust-lang/rust/pull/160336

That's ~half of them, I'm not doing it all in one go to reduce conflicts.
2026-09-23 09:55:44 +08:00
mejrs
78d478a7e4 Update deprecated rustc_hir imports 2026-09-22 23:31:09 +02:00
Jonathan Brouwer
5586b8f14d Rollup merge of #163135 - durin42:base64-upgrade, r=Urgau
librustdoc: remove stale dep on base64

This appears to have become unused in August 2025. I noticed today because of trying to consolidate versions of things in the toolchain.
2026-09-22 22:50:36 +02:00
Yacin Tmimi
51aa65eabb chore: bump rustfmt version to v1.11.0 2026-09-21 22:25:57 -04:00
Augie Fackler
240e41a85e librustdoc: remove stale dep on base64
This appears to have become unused in August 2025. I noticed today
because of trying to consolidate versions of things in the toolchain.
2026-09-21 16:26:16 -04:00
bors
50d54098ec Auto merge of #162920 - JonathanBrouwer:rollup-rnSnu16, r=JonathanBrouwer
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#161987 (fix `is_single_fp_element` for `s390x` and `x86`)
 - rust-lang/rust#162366 (Replace hard linked `metadata.rmeta` with a copy when finalizing the incremental compilation session dir fails)
 - rust-lang/rust#162552 (RISC-V: Add Zmmul target feature)
 - rust-lang/rust#162602 (Ensure concurrent rustc instances in the same process correctly lock the session dir)
 - rust-lang/rust#162885 (Remove one remaining use of `Level::Help`)
 - rust-lang/rust#162606 (c-b: Export `fmaf16` now that we have an implementation)
 - rust-lang/rust#162817 (rustc_{codegen_,}llvm: adapt to new ThreadModel API)
 - rust-lang/rust#162860 (offload: add libLLVM rpath for libomptarget)
 - rust-lang/rust#162895 (Avoid derive edits on macro-generated types)
 - rust-lang/rust#162899 (Error on invalid placements of the `cfi_encoding` attribute.)
2026-09-18 01:17:44 +00:00
Jonathan Brouwer
ed96d94d78 Rollup merge of #162602 - bjorn3:safer_fcntl_fallback, r=oli-obk
Ensure concurrent rustc instances in the same process correctly lock the session dir

This introduces a global lock registry for the `fcntl` lock fallback to allow emulating fd based locks (like `flock()`) on top of the `fcntl(F_SETLK)` process based locks, thereby ensuring that concurrent rustc instances inside the same process don't break the incr comp locking scheme.

Based on https://github.com/rust-lang/rust/pull/162584
2026-09-17 21:00:10 +02:00
bors
330d317121 Auto merge of #162898 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? Manishearth

`Cargo.lock` update due to dep cleanup in Clippy.
2026-09-17 18:48:19 +00:00
Philipp Krones
13a3610079 Update Cargo.lock 2026-09-17 14:12:09 +02:00
Nicholas Nethercote
79d24a0679 Move operations out of rustc_middle::query::job
Generally `rustc_middle::query` has types while `rustc_query_impl` has
operations. So this commit moves some operations from the former to the
latter. Some of them are just moved, while others are inlined and
removed.
2026-09-17 10:52:30 +10:00
bjorn3
0143ce1a52 Have a separate copy of the flock code for rustdoc
This copy will retain and is specialized for blocking operations.
2026-09-16 12:18:56 +02:00
bors
3fcfc54fbc Auto merge of #161200 - mejrs:fake_item_queries, r=camelid
querify getting fake doc items
2026-09-12 21:05:12 +00:00
mejrs
8123f4ab2d querify getting fake doc items 2026-09-12 19:24:44 +02:00
Zalathar
df15f022ef Disconnect rustc_codegen_ssa from rustc_mir_transform
The direct dependency from `rustc_codegen_ssa` to `rustc_mir_transform` allowed
codegen to reuse some MIR-transform code for identifying unnecessary landing
pads.

However, we can achieve the same result by calling through a hook on `TyCtxt`,
eliminating the crate dependency.
2026-09-12 21:59:29 +10:00
Jacob Pratt
4e1c7f9f55 Rollup merge of #162270 - ChrisDenton:winagain, r=clarfonthey
Update `windows-bindgen` to 0.100.0

This release represents a major change in the way bindings are generated. See https://github.com/microsoft/windows-rs/issues/4867 for details.

In short, it now more directly follows the C headers. For the standard library's purposes this is mostly reflected in relatively minor type changes or with some `const` pointers becoming `mut`.

There is however one big change that affects a lot of types. In the headers there are a lot of `#define`s like this:

```c
#define GENERIC_READ                     (0x80000000L)
#define GENERIC_WRITE                    (0x40000000L)
```

These are constants for the access mode. In this case they're explicitly declared as `L` (aka signed long) integer types (in other cases there's no type at all). However, this conflicts with how access mode constants are actually used. E.g., see `CreateFileW`:

```c
WINBASEAPI
HANDLE
WINAPI
CreateFileW(
    _In_ LPCWSTR lpFileName,
    _In_ DWORD dwDesiredAccess,
    _In_ DWORD dwShareMode,
    _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
    _In_ DWORD dwCreationDisposition,
    _In_ DWORD dwFlagsAndAttributes,
    _In_opt_ HANDLE hTemplateFile
    );
```

Here `dwDesiredAccess` is a `DWORD`, which in rust equates to `u32`. The constant being signed but the usage being unsigned is not a problem for C/C++. They will happily convert between types at the drop of a hat. Rust however is stricter, as you know.

The old metadata used by `windows-bindgen` tried to try to fixup this mismatch but the new one goes strictly by what can be inferred from the headers.  The hope in the future is that the headers themselves will be updated so better bindings can be directly derived from them.
2026-09-11 00:03:06 -04:00
bors
f207aa3913 Auto merge of #162333 - Zalathar:rollup-DdpfsFl, r=Zalathar
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#162324 (miri subtree update)
 - rust-lang/rust#162170 (bootstrap: use target's LLVM libdir when cross-compiling)
 - rust-lang/rust#158312 (Adds support for AArch64 SVE to inline assembly)
 - rust-lang/rust#159792 (A more readable debug map for IndexMaps)
 - rust-lang/rust#160745 (make closures act like MaybeDangling)
 - rust-lang/rust#161263 (break rustc_expand-rustc_middle dependency)
 - rust-lang/rust#161895 (std::sys::pal::sgx: fix mismatched alloc/free alignment)
 - rust-lang/rust#161940 (Promote `wasm32-wasip3` to a tier 2 target)
 - rust-lang/rust#161397 (coverage: Tidy tests and add some new ones)
 - rust-lang/rust#161616 (Report precondition violation for `<usize as SliceIndex>::get_unchecked` in const-eval)
 - rust-lang/rust#162248 (Add regression test for unsized const parameter default ICE)
 - rust-lang/rust#162250 (Fix hashing of span end columns in incremental compilation)
 - rust-lang/rust#162265 (cargotest: add lockfiles)
 - rust-lang/rust#162318 (bootstrap: Fix broken path for `./x doc compiler/rustc --open`)
2026-09-05 17:04:57 +00:00
mejrs
297c72a614 break rustc_expand-rustc_middle dependency 2026-09-05 02:17:36 +02:00
Jonathan Brouwer
9af53e9b6d Rollup merge of #160936 - Dnreikronos:traits/live_args_bitset, r=lcnr,jackh726,adwinwhite
traits: Represent live alias arguments as bitsets

Split out of rust-lang/rust#160212 per review / Zulip: https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/rigid.20aliases.20in.20region.20handling/near/615557841

`live_args_for_alias_from_outlives_bounds` and `args_known_to_outlive_alias_params` now return identity arg indices (`DenseBitSet`) instead of `EarlyBinder<GenericArg>`. Callers just do `args[idx].visit_with(...)`, so we stop laundering rigidness through binder instantiate. Also drops the old BitSet FIXME.

imo this is worth doing on its own even without the ICE fix. every time we shoved identity params through `EarlyBinder` we were writing down something we don't actually know, and this module is only going to grow. better to make the invariant explicit now than keep paying for it later.

No behavioral change intended. the rigid-alias ICE / `extract_verify_if_eq` bits stay on rust-lang/rust#160212. btw if that one should stack on this instead of staying independent, lmk and I'll rebase it asap.
2026-09-04 22:29:07 +02:00
Chris Denton
9bce023c1f Upgrade windows-bindgen in generate-windows-sys 2026-09-04 14:30:51 +00:00
Guillaume Gomez
3d6b9b4dee Update askama version to 0.16.1 2026-09-04 14:48:32 +02:00
Jonathan Brouwer
f0fd2caeeb Rollup merge of #157808 - 1c3t3a:sanitizer-ignorelist, r=rcvalle
sanitizers: Implement support for the sanitize ignorelist

The sanitize ignorelist gives central controls over which functions, files, etc. should be ignored and not sanitized. It is a common file format for clang and explained here:
https://clang.llvm.org/docs/SanitizerSpecialCaseList.html. This change adds support for this list in Rust as well.

r? @rcvalle
2026-09-04 09:44:44 +02:00
Bastian Kersting
c0e55d66cc sanitizers: Implement support for the sanitize ignorelist
The sanitize ignorelist gives central controls over which functions,
files, etc. should be ignored and not sanitized. It is a common file
format for clang and explained here:
https://clang.llvm.org/docs/SanitizerSpecialCaseList.html. This change
adds support for this list in Rust as well.
2026-09-03 15:53:04 +00:00
bors
59dabe56f7 Auto merge of #162135 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? Manishearth 

2 days early, as cargo needs a fix that landed in Clippy last week and @weihanglo pointed out to me that I might run into bors queue stalls on Thursday with the 1.98.1 release.
2026-09-02 10:44:38 +00:00
Jonathan Brouwer
fdfd0e0ac9 Rollup merge of #161287 - robertbastian:23, r=Manishearth
Update `icu_list` dependency to 2.3

This removes the `icu_collections` transitive dependency, and uses the smaller `icu_locale_fallback` instead of `icu_locale`.

r? manishearth
2026-09-01 21:26:11 +02:00
Philipp Krones
c82e1d80a5 Update Cargo.lock 2026-09-01 18:39:31 +02:00
Robert Bastian
80dc5df240 Update icu_list to 2.3 2026-09-01 13:45:58 +02:00
Jonathan Brouwer
bcaa514284 Rollup merge of #162097 - mejrs:instrumentfnattr, r=JonathanBrouwer
Deduplicate `InstrumentFnAttr`

cc @pmur

Instead of having a `Default` variant (which can't be specified in the attribute, it only does on/off), use an Option to model "no attribute used".
2026-09-01 13:27:46 +02:00
Jonathan Brouwer
dbfa398db0 Rollup merge of #162075 - mejrs:track_caller_closure_gating, r=JonathanBrouwer
Move track_caller on closures gating to attribute parsing

I noticed this while reviewing rust-lang/rust#161958
2026-09-01 13:27:45 +02:00
Jonathan Brouwer
8536b9e91a Rollup merge of #162051 - nnethercote:rustc_feature-cleanups, r=JonathanBrouwer
`rustc_feature` cleanups

Various cleanups. Details in individual commits.

r? @JonathanBrouwer
2026-09-01 13:27:43 +02:00
mejrs
8717cbaa84 Deduplicate InstrumentFnAttr 2026-08-31 20:48:05 +02:00
mejrs
e18a0126ea Move track_caller on closures gating to attribute parsing 2026-08-31 19:12:19 +02:00
Nicholas Nethercote
cd09177a9a Derive StableHash for three feature structs 2026-08-31 19:59:03 +10:00
mejrs
7b159d5ff6 touch up "get attribute" docs. 2026-08-30 17:18:04 +02:00
bors
4545c83692 Auto merge of #161990 - GuillaumeGomez:rollup-jrJIOEF, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#160941 (Enforce safety comments on `alloc`)
 - rust-lang/rust#161975 (Abort instead of unwinding out of an inconsistent BTreeMap::split_off)
 - rust-lang/rust#157968 (Preserve ambiguous glob lint for subtrait method picks)
 - rust-lang/rust#161514 (rework handling of doc attributes on macro calls)
 - rust-lang/rust#161944 (rustdoc: Take into account edition information for keyword highlighting)
 - rust-lang/rust#161974 (remove rustc_never_type_options attr remnants)
 - rust-lang/rust#161978 (Move rustdoc ui doctests into the right testsuite)

Failed merges:

 - rust-lang/rust#161702 (Use `drop_guard` in some places in {core,alloc,std})
2026-08-29 21:10:03 +00:00
Jieyou Xu
e3e8a34286 [Deps] Regenerate lockfile 2026-08-29 15:37:12 +08:00
mejrs
9529e2dbf3 rework handling of doc attributes on macro calls 2026-08-28 21:33:40 +02:00
Weihang Lo
e3af0b6bc3 compiletest: remove unused unified-diff dep
```
warning: unused dependency `unified-diff`
  --> src/tools/compiletest/Cargo.toml:37:1
   |
37 | unified-diff = "0.2.1"
   | ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `cargo::unused_dependencies` is set to `warn` by default
help: consider removing the dependency on `unified-diff`
warning: `compiletest` (manifest) generated 1 warning
```

See
<https://triage.rust-lang.org/gha-logs/rust-lang/rust/98030530980#L2026-08-26T03:05:07.8912904Z-L2026-08-26T03:05:07.8915112Z>
2026-08-26 20:54:11 -04:00
Ralf Jung
3be0b65954 update lockfile 2026-08-25 10:42:03 +02:00
Stuart Cook
b1246b658a Rollup merge of #161588 - RalfJung:eyre, r=jieyouxu
update eyre

This fixes some future-compat warnings in ui_test.
(The warnings show up in a different crate due to macros being involved.)
2026-08-24 14:21:56 +10:00
Stuart Cook
def3363dbc Rollup merge of #161569 - zachs18:bump-cfg_aliases, r=hanna-kruppe
Bump cfg_aliases to 0.2.2

Resolves FCW in `nix@0.30.1`'s usage of `cfg_aliases` when building stage1 since https://github.com/rust-lang/rust/pull/159222 reached beta.

Example of FCW: https://github.com/rust-lang/rust/actions/runs/32585824494/job/97061994743?pr=161548#step:28:4792 . If you `./x b` locally, then you should also see this warning, and have a file `build/x86_64-unknown-linux-gnu/stage1-rustc/.future-incompat-report.json` mentioning `nix` and `cfg_aliases`.

cc @Zalathar
2026-08-24 14:21:53 +10:00
Philipp Krones
aa2f8d21df Update Cargo.lock 2026-08-23 19:45:42 +02:00
Ralf Jung
615e6d188e update eyre 2026-08-23 13:12:27 +02:00
Zachary S
b14b89fd7d Bump cfg_aliases to 0.2.2
Resolves FCW in `nix@0.30.1`'s usage of `cfg_aliases`.
2026-08-22 19:36:22 -05:00
bors
124c16e0de Auto merge of #161260 - weihanglo:cc-1.4.3, r=Kobzol
chore: bump to cc@1.4.3 for rustc_llvm and library



### What is this?

Old cc-rs derives this from the `-Clto` rustflag on its own.
`cc@1.2.39` starts gating that behind `-Clinker-plugin-lto`,
which bootstrap doesn't pass.
Therefore,
we need to pass this flag explicitly to keep LTO mode

Previous efforts:

* https://github.com/rust-lang/rust/pull/146186
* https://github.com/rust-lang/rust/pull/155438

I personally want this because of cc 1.3.0+ has the support of Cargo `-Ztrim-paths`,
which helps what I am experimenting in <https://github.com/rust-lang/rust/pull/161049>.

### How to review

Commit by commit. 

To keep commits bisect-able,
I added the first commit without cc bump.
clang should be fine with duplicate `-flto` flags.

One thing I am not certain is whether we should probe `-flto` flag in this case,
or just make this fail if `-flto` isn't supported.
(I assume `-flto` is quote widely supported)

r? Kobzol

---

🤖 **LLM disclosure:** I used LLM for the experiment of <https://github.com/rust-lang/rust/pull/161049>, but not the bootstrap LTO change in this PR.
2026-08-21 21:36:33 +00:00
Weihang Lo
db43e49dae rustc_llvm: bump cc to 1.4.3
Also pulls in

* find-msvc-tools 0.1.5 -> 0.1.11
* shlex 2.0.1 (new transitive dep of cc)
2026-08-21 09:54:29 -04:00
Jacob Pratt
cc58c4218f Rollup merge of #161259 - mejrs:attr_structures, r=JonathanBrouwer
move some attribute related structs out of rustc_attr_ir

This changes it so that

- rustc_session no longer depends on rustc_attr_ir
- rustc_attr_ir no longer depends on rustc_target (which is a fairly sizeable crate)
- rustc_attr_ir and rustc_target can compile in parallel

Previous graph:
<img width="985" height="512" alt="image" src="https://github.com/user-attachments/assets/cbde2414-043e-45f2-88a2-f77a5c9df60c" />

Graph with this PR:
<img width="1248" height="474" alt="image" src="https://github.com/user-attachments/assets/e0e13794-b17b-4337-8768-f0191cb1c0e6" />

r? @JonathanBrouwer
2026-08-21 08:43:39 -04:00
mejrs
7bec351981 move CollapseMacroDebuginfo 2026-08-21 10:35:10 +02:00
mejrs
8d970ffe69 Move NativeLibKind 2026-08-21 10:35:04 +02:00
mejrs
38af4a23c2 move CrateType 2026-08-21 10:35:02 +02:00
mejrs
f713bb2185 invert dependency on rustc_error_messages 2026-08-21 10:33:59 +02:00