Commit Graph

3874 Commits

Author SHA1 Message Date
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
mejrs
2a20dfa922 move SanitizerSet 2026-08-21 10:33:58 +02:00
mejrs
589bb91122 Move Limit 2026-08-21 10:33:56 +02:00
bors
16a623ad67 Auto merge of #161434 - jhpratt:rollup-hq3P7uc, r=jhpratt
Rollup of 25 pull requests

Successful merges:

 - rust-lang/rust#152617 (std: implement `sleep_until` for Fuchsia)
 - rust-lang/rust#158934 (diagnostics: fix `let x: vec![]` suggestion pointing into stdlib)
 - rust-lang/rust#160995 (Tiny readability cleanups for initialization dataflow analyses)
 - rust-lang/rust#161277 (bootstrap: Move all non-module items out of the crate root)
 - rust-lang/rust#161295 (std: don't panic on long-elapsed deadlines for `sleep_until`)
 - rust-lang/rust#161368 (Double-word align `_Unwind_Exception`)
 - rust-lang/rust#161370 (Uplift rustfmt macro formatting fix)
 - rust-lang/rust#161378 (`FlowSensitiveAnalysis` cleanups)
 - rust-lang/rust#161420 (Bump wasm-component-ld to 0.5.30)
 - rust-lang/rust#161429 (Tighten allocator `Send`/`Sync` requirements for `Arc` in preparation for refactor)
 - rust-lang/rust#158032 (Offload expose device selection)
 - rust-lang/rust#158855 (Add `desktop` method to `CommandExt`)
 - rust-lang/rust#160299 (Stabilize `bool::toggle`)
 - rust-lang/rust#160842 (Apply `&[T]` visualizer to `*const [T]`, `*mut [T]` and `Box<[T]>`)
 - rust-lang/rust#160981 (Partially support building and locating wasm proc-macros)
 - rust-lang/rust#161199 (Add regression test for non lifetime binders)
 - rust-lang/rust#161212 (rust-installer/install-template.sh: catch cp(1) error when installing…)
 - rust-lang/rust#161302 (Add regression test for inconsistent import resolution from issue 147208)
 - rust-lang/rust#161329 (Add regression tests for a few fixed issues with E-needs-test)
 - rust-lang/rust#161330 (Add regression test for nested RPIT not an iterator ICE)
 - rust-lang/rust#161331 (Bitset simplifications)
 - rust-lang/rust#161340 (rustdoc: enable scrolling only on table/code)
 - rust-lang/rust#161351 (Cleanup: Move impl of `#[rustc_dump_object_lifetime_defaults]`)
 - rust-lang/rust#161355 (Add file path to some archive build errors)
 - rust-lang/rust#161373 (Allow running EC2 jobs locally)
2026-08-21 06:25:29 +00:00
mejrs
7cd9c920cd rustc_session; remove rustc_lint_defs rex-exports 2026-08-20 23:02:49 +02:00
Alex Crichton
2475f7c0a2 Bump wasm-component-ld to 0.5.30
Updates the bundled version with the Rust toolchain to pull in recent
bugfixes and support for the upcoming wasm32-wasip3 target.
2026-08-20 11:25:38 -07:00
mejrs
00d78026ae remove rustc_error_messages dependency 2026-08-18 14:57:00 +02:00
bors
34baba5394 Auto merge of #160529 - cuviper:deps, r=Mark-Simulacrum
Upgrade and deduplicate dependencies



- Upgrade from `getrandom v0.4.2` to `v0.4.3` to drop its `wasip2` and
  `wasip3` dependencies and many transitives.
- Upgrade from `gimli v0.33` to `v0.34` as a direct dependency and
  through a `thorin-dwp` upgrade.
- Upgrade from `object v0.37` and `v0.38` to `v0.39` as a direct
  dependency and via `ar_archive_writer` and `thorin-dwp` upgrades.
- Upgrade `libloading` and `wasmparser` to match other dependencies.

This also consolidates from `hashbrown v0.15`, `v0.16`, and `v0.17` to
just `v0.17.1`, which is the same that `std` currently uses.
2026-08-16 18:44:21 +00:00
Jacob Pratt
5d2cf8f4f8 Rollup merge of #160978 - mejrs:resolve_path, r=nnethercote
move resolve_path to Session inherent method

rustc_passes depends on rustc_expand just for this, which is imo unnecessary.
2026-08-12 20:17:34 -04:00
Marcelo Dominguez
4d52fe93a2 Add 3-pass compilation to support generics and remove no_mangle attr 2026-08-12 18:06:00 +03:00
mejrs
b9e9138428 move resolve_path to Session inherent method 2026-08-12 12:59:52 +02:00
mejrs
5c8e769df5 remove libc dependency 2026-08-11 20:34:50 +02:00
Joao Roberto
32aecb0125 Represent live alias arguments as bitsets
Store identity argument indices instead of bound generic arguments so
callers can index concrete alias arguments without changing rigidness
through instantiation.
2026-08-11 15:21:28 -03:00
mejrs
65d9d0e3aa split off hir::definitions 2026-08-11 17:59:21 +02:00
mejrs
b588ef3b37 Move rustc_session cstore module to its own crate 2026-08-11 17:12:12 +02:00