3909 Commits

Author SHA1 Message Date
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
Josh Stone
7672b83df3 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-10 08:53:07 -07:00
Jonathan Brouwer
62641fab03 Rollup merge of #160846 - mejrs:more_attrs, r=JonathanBrouwer
use rustc_attr_ir imports more

For now this is only for crates that (barely) don't actually depend on rustc_hir

r? @JonathanBrouwer
2026-08-10 13:45:46 +02:00
mejrs
e35d06a821 rustc_builtin_macros: depend on rustc_attr_ir instead 2026-08-10 13:08:08 +02:00
mejrs
8c85df353e rustc_expand: depend more on rustc_attr_ir 2026-08-10 13:08:08 +02:00
mejrs
1c9d8461d6 rustc_ast_passes: use rustc_attr_ir imports 2026-08-10 13:07:48 +02:00
mejrs
12674a1f58 rustc_session: minimize rustc_hir dependencies 2026-08-10 12:01:06 +02:00
mejrs
ef151d65d2 rustc_attr_parsing: depend on rustc_attr_ir instead of rustc_hir 2026-08-10 11:43:54 +02:00
bors
8a2fbe3ea8 Auto merge of #160830 - jhpratt:rollup-IMvXhX3, r=jhpratt
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#160675 (bootstrap: Remove `PATH_REMAP` from command-line selector handling )
 - rust-lang/rust#160807 (Update rustc crate rkyv to 0.8.18)
 - rust-lang/rust#159690 (Clarify `--remap-path-scope` impact on `rustc` metadata)
 - rust-lang/rust#160560 (Add nightly-only support for Cargo unremap trim-paths files in `rust-gdb`)
 - rust-lang/rust#160608 (normalization rework: clean up projection_ty_core)
 - rust-lang/rust#160785 (Get rid of LLM disclosure checkboxes)
 - rust-lang/rust#160804 (Change .expect message on net/parser to follow precondition style)
 - rust-lang/rust#160805 (`extern "custom"`: add tests)
 - rust-lang/rust#160816 (Mark const ptr methods and free functions as inline(always) to match *mut)
 - rust-lang/rust#160820 (Stabilize fs_set_times)
 - rust-lang/rust#160826 (Rename parse_delimited_token_tree in cfg_select)
2026-08-10 06:25:17 +00:00
Chris Denton
4641990929 Remove ensure_sufficient_stack 2026-08-09 19:58:29 +00:00
Romain Perier
7ee723b9db Update rustc crate rkyv to 0.8.18 [SECURITY]
This fixes RUSTSEC-2026-0233, RUSTSEC-2026-0234 and RUSTSEC-2026-0235.
2026-08-09 15:00:49 +02:00
mejrs
af4c79b260 Move attributes out of rustc_hir 2026-08-08 11:43:20 +02:00
Philipp Krones
9e7db05c30 Update Cargo.lock 2026-08-07 13:51:31 +02:00
bors
87212cef77 Auto merge of #160559 - JonathanBrouwer:rollup-grEEuN1, r=JonathanBrouwer
Rollup of 25 pull requests

Successful merges:

 - rust-lang/rust#158147 (std: fix stack buffer overflow in Windows junction_point)
 - rust-lang/rust#160130 (Select cache values to verify by key fingerprint, not value fingerprint)
 - rust-lang/rust#160343 (Rename `OutlivesPredicate` to `OutlivesClause`)
 - rust-lang/rust#160360 (Remove rustc_middle dependency on rustc_hir_pretty)
 - rust-lang/rust#160387 (rustc_codegen_ssa: Correctly apply the static `--jobs-backend` limit to backend parallelism)
 - rust-lang/rust#160422 (move mir-opt miri tests to CI logic)
 - rust-lang/rust#160444 (Avoid resolving path keywords outside `TypeNS`)
 - rust-lang/rust#160510 (Resolver: (un)tracked borrows for `CmRefCell` made safe by unsafe speculative flag)
 - rust-lang/rust#155424 ([blocked] Link to proposed LLM policy in CONTRIBUTING and pull request template)
 - rust-lang/rust#158726 (std: move futex implementations into sys::sync::futex)
 - rust-lang/rust#158762 (Emit thumb code on VEX V5)
 - rust-lang/rust#159225 (Split IncrCompSession out of Session)
 - rust-lang/rust#159820 (Make the `rustc_unsafe_specialization_marker` attribute actually `unsafe`)
 - rust-lang/rust#160198 (Rework `smallest_range_containing` to handle duplicates)
 - rust-lang/rust#160362 (Split `SpannedTypeVisitor` into its own crate, `rustc_ty_walk`)
 - rust-lang/rust#160390 (autodiff: Handle slice-tailed DSTs in type trees)
 - rust-lang/rust#160420 (Suggest `cast_signed()` for overflowing signed integer literals)
 - rust-lang/rust#160501 (Add bootstrap CLI snapshot test for testing miri)
 - rust-lang/rust#160516 (Add regression test for HRTB projection in closure)
 - rust-lang/rust#160520 (Add some tests for specialization)
 - rust-lang/rust#160522 (fix(bootstrap): Normalize the names of proc macro dependency crates)
 - rust-lang/rust#160523 (Add regression test for opaque type)
 - rust-lang/rust#160531 (docs: fix typo in AllowExprMetavar comment)
 - rust-lang/rust#160538 (Update expect messages in tcp.rs doc examples to follow the style guide)
 - rust-lang/rust#160548 (bootstrap: Register `coverage-map` and `coverage-run` aliases via a separate step)
2026-08-05 14:34:28 +00:00
Jonathan Brouwer
4c08ad5b0c Rollup merge of #160362 - joshtriplett:ty-walk-crate, r=fee1-dead
Split `SpannedTypeVisitor` into its own crate, `rustc_ty_walk`

`rustc_privacy` pulls in all of `rustc_ty_utils`, but only wants `SpannedTypeVisitor` and `walk_types`. Move those to a small `rustc_ty_walk` crate.

This allows `rustc_privacy` to start building much sooner.
2026-08-05 13:36:14 +02:00
bors
22950ab9e2 Auto merge of #159026 - WaffleLapkin:fallback-refactorings, r=lcnr
Type fallback refactorings





- Don't merge different kinds of infer variables into `Ty` before matching them back
- Do fallback only on root vars (this is semantically equivalent to what we currently do; unifying any of the infer vars from the same equivalence class necesserily affects all of them) (this makes https://github.com/rust-lang/rust/pull/159003 a bit less hacky though)
- Do some simplification that has been allowed by the previous changes

cc @lcnr
2026-08-05 11:34:06 +00:00