Commit graph

80 commits

Author SHA1 Message Date
Jonathan Brouwer
ea43035654
Convert to inline diagnostics in rustc_passes 2026-02-06 13:31:54 +01:00
Jonathan Brouwer
771fa578bf
Rollup merge of #152117 - JonathanBrouwer:convert_trait_selection2, r=GuillaumeGomez
Convert to inline diagnostics in `rustc_trait_selection`

For https://github.com/rust-lang/rust/issues/151366
r? @jdonszelmann
2026-02-06 10:06:43 +01:00
Jonathan Brouwer
55d1ba12d9
Convert to inline diagnostics in rustc_trait_selection 2026-02-05 16:58:59 +01:00
Jonathan Brouwer
dd61998e74
Convert to inline diagnostics in rustc_borrowck 2026-02-05 16:55:55 +01:00
Jonathan Brouwer
3c61714cc3
Rollup merge of #152121 - JonathanBrouwer:convert_builtin_macros, r=lqd
Convert to inline diagnostics in `rustc_builtin_macros`

For https://github.com/rust-lang/rust/issues/151366
r? @jdonszelmann
2026-02-05 12:17:01 +01:00
Jonathan Brouwer
3421938bb8
Rollup merge of #152106 - JonathanBrouwer:convert_ast_passes, r=jdonszelmann
Convert to inline diagnostics in `rustc_ast_passes`

For https://github.com/rust-lang/rust/issues/151366
r? @jdonszelmann
2026-02-05 12:16:59 +01:00
Jonathan Brouwer
67c6cd99b7
Convert to inline diagnostics in rustc_pattern_analysis 2026-02-05 12:13:25 +01:00
Jonathan Brouwer
0da9476010
Convert to inline diagnostics in rustc_ast_passes 2026-02-05 12:08:42 +01:00
Jonathan Brouwer
d40e60fc44
Convert to inline diagnostics in rustc_builtin_macros 2026-02-05 12:00:56 +01:00
Jonathan Brouwer
945bfa770e
Rollup merge of #152105 - GuillaumeGomez:inline-diag-rustc_ast_lowering, r=JonathanBrouwer
Convert to inline diagnostics in `rustc_ast_lowering`

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

r? @JonathanBrouwer
2026-02-05 08:32:51 +01:00
Jonathan Brouwer
44a14c1f30
Convert to inline diagnostics in rustc_hir_typeck 2026-02-04 21:36:48 +01:00
Guillaume Gomez
8d09ba7ae5 Convert to inline diagnostics in rustc_ast_lowering 2026-02-04 16:28:49 +01:00
Jonathan Brouwer
bf838717a4
Rollup merge of #152072 - JonathanBrouwer:convert_monomorphize, r=jdonszelmann
Convert to inline diagnostics in `rustc_monomorphize`

For https://github.com/rust-lang/rust/issues/151366

r? @jdonszelmann
2026-02-04 14:39:27 +01:00
Jonathan Brouwer
ecafacdeb7
Rollup merge of #152069 - JonathanBrouwer:convert_privacy, r=lqd
Convert to inline diagnostics in `rustc_privacy`

For https://github.com/rust-lang/rust/issues/151366

r? @jdonszelmann
2026-02-04 14:39:25 +01:00
Jonathan Brouwer
8e361cfa69
Rollup merge of #152065 - JonathanBrouwer:convert_ty_utils, r=lqd
Convert to inline diagnostics in `rustc_ty_utils`

For https://github.com/rust-lang/rust/issues/151366

r? @jdonszelmann
2026-02-04 14:39:23 +01:00
Jonathan Brouwer
ae21d43933
Convert to inline diagnostics in rustc_privacy 2026-02-04 08:11:40 +01:00
Jonathan Brouwer
7960088392
Rollup merge of #152073 - JonathanBrouwer:convert_mir_dataflow, r=lqd
Convert to inline diagnostics in `rustc_mir_dataflow`

For https://github.com/rust-lang/rust/issues/151366

r? @jdonszelmann
2026-02-03 23:29:58 +01:00
Jonathan Brouwer
4fdd085e28
Convert to inline diagnostics in rustc_mir_dataflow 2026-02-03 23:25:59 +01:00
Jonathan Brouwer
4cacfc00bc
Convert to inline diagnostics in rustc_incremental 2026-02-03 23:22:48 +01:00
Jonathan Brouwer
d457ffd4f4
Convert to inline diagnostics in rustc_monomorphize 2026-02-03 22:44:22 +01:00
Jonathan Brouwer
590fa1e6cb
Convert to inline diagnostics in rustc_ty_utils 2026-02-03 21:32:03 +01:00
Jonathan Brouwer
7997b11cfd
Rollup merge of #152041 - JonathanBrouwer:query_system_convert, r=jdonszelmann
Convert to inline diagnostics in `rustc_query_system`

For https://github.com/rust-lang/rust/issues/151366#event-22181360642

r? @jdonszelmann (or anyone else who feels like it)
2026-02-03 18:54:51 +01:00
Jonathan Brouwer
fabcf5aeb8
Rollup merge of #151944 - JonathanBrouwer:diag4, r=jdonszelmann
Convert to inline diagnostics in `rustc_attr_parsing`

Converts a crate for rust-lang/rust#151366
This PR is almost completely autogenerated by a hacky script I have locally :)
2026-02-03 18:54:49 +01:00
Jonathan Brouwer
13e97ac9b2
Rollup merge of #152045 - JonathanBrouwer:rustc_infer_convert, r=lqd
Convert to inline diagnostics in `rustc_infer`

For https://github.com/rust-lang/rust/issues/151366
2026-02-03 18:54:47 +01:00
Jonathan Brouwer
1722b8e06b
Convert to inline diagnostics in rustc_infer 2026-02-03 15:14:49 +01:00
Jonathan Brouwer
30f82aac5b
Convert to inline diagnostics in rustc_query_system 2026-02-03 14:01:05 +01:00
Jonathan Brouwer
a9f81ea43e
Convert to inline diagnostics in rustc_attr_parsing 2026-02-03 09:59:11 +01:00
Jonathan Brouwer
c07f10c2c1
Convert to inline diagnostics in rustc_driver_impl 2026-02-03 08:51:31 +01:00
JayanAXHF
67c45b739a feat: added syntax highlighting for code blocks in rustc --explain
This commit adds a heuristics-based syntax highlighter for the `rustc
--explain` command. It uses `rsutc_lexer`'s lexer to parse input in
tokens, and matches on them to determine their color.
2026-01-19 17:44:24 +05:30
Manuel Drehwald
5fbe5dae42 Only try to link against offload functions if llvm.enzyme is enabled 2025-11-23 00:19:53 -08:00
bjorn3
1991779bd4 Make llvm_enzyme a regular cargo feature
This makes it clearer that it is set by the build system rather than by
the rustc that compiles the current rustc. It also avoids bootstrap
needing to pass --check-cfg llvm_enzyme to rustc.
2025-09-15 15:31:56 +00:00
Nicholas Nethercote
301655eafe Revert introduction of [workspace.dependencies].
This was done in #145740 and #145947. It is causing problems for people
using r-a on anything that uses the rustc-dev rustup package, e.g. Miri,
clippy.

This repository has lots of submodules and subtrees and various
different projects are carved out of pieces of it. It seems like
`[workspace.dependencies]` will just be more trouble than it's worth.
2025-09-02 19:12:54 +10:00
Nicholas Nethercote
daf6fe2c1b Add serde_json to [workspace.dependencies]. 2025-08-28 20:10:54 +10:00
Nicholas Nethercote
12dc789bc6 Add libc to [workspace.dependencies]. 2025-08-28 20:10:54 +10:00
Nicholas Nethercote
c50d2cc807 Add tracing to [workspace.dependencies]. 2025-08-27 14:21:19 +10:00
Nicholas Nethercote
704f2ca172 Tidy up Cargo.toml files.
- Add some missing `tidy-alphabetical-*` markers.
- Remove some unnecessary blank lines.
2025-07-31 19:58:04 +10:00
Makai
6598c61725 rename stable_mir to rustc_public, and rustc_smir to rustc_public_bridge 2025-07-14 09:25:54 +00:00
bjorn3
87958ad683 Avoid building C++ for rustc_llvm with --compile-time-deps
This saves about 30s.
2025-07-11 13:32:03 +00:00
klensy
9cacafdd1a compiler & tools: bump windows crate to dedupe versions 2025-05-17 15:26:38 +03:00
Celina G. Val
0f81fca8ec Change rustc_driver dependency on stable_mir crate
This fixes issues with RustAnalyzer not finding stable_mir crate.
It is also part of the long term architecture plan for these crates,
since we are moving towards having stable_mir depend on rustc_smir and
not the other way around.

I believe this is an utility function that will come handy eventually
for stable_mir users, but I'm keeping it as part of rustc_internal since
it initializes the StableMir context and requires `TyCtxt`.

Finally, I added the rustc_internal crate under a feature since the APIs
from this module shall not be stabilized.
2025-04-30 15:39:52 -07:00
clubby789
41fcdab3b5 Switch time to jiff for time formatting in ICE dumps 2025-04-05 09:52:55 +00:00
Nicholas Nethercote
8121958fda Use -Wunused_crate_dependencies for compiler crates.
It's very useful. There are some false positives involving integration
tests in `rustc_pattern_analysis` and `rustc_serialize`. There is also a
false positive involving `rustc_driver_impl`'s
`rustc_randomized_layouts` feature. And I removed a `rustc_span` mention
in a doc comment in `rustc_log` because it wasn't integral to the
comment but caused a dev-dependency.
2025-03-20 08:59:43 +11:00
许杰友 Jieyou Xu (Joe)
063ef18fdc Revert "Use workspace lints for crates in compiler/ #138084"
Revert <https://github.com/rust-lang/rust/pull/138084> to buy time to
consider options that avoids breaking downstream usages of cargo on
distributed `rustc-src` artifacts, where such cargo invocations fail due
to inability to inherit `lints` from workspace root manifest's
`workspace.lints` (this is only valid for the source rust-lang/rust
workspace, but not really the distributed `rustc-src` artifacts).

This breakage was reported in
<https://github.com/rust-lang/rust/issues/138304>.

This reverts commit 48caf81484, reversing
changes made to c6662879b2.
2025-03-10 18:12:47 +08:00
Nicholas Nethercote
beba32cebb Specify rust lints for compiler/ crates via Cargo.
By naming them in `[workspace.lints.rust]` in the top-level
`Cargo.toml`, and then making all `compiler/` crates inherit them with
`[lints] workspace = true`. (I omitted `rustc_codegen_{cranelift,gcc}`,
because they're a bit different.)

The advantages of this over the current approach:
- It uses a standard Cargo feature, rather than special handling in
  bootstrap. So, easier to understand, and less likely to get
  accidentally broken in the future.
- It works for proc macro crates.

It's a shame it doesn't work for rustc-specific lints, as the comments
explain.
2025-03-08 08:41:09 +11:00
Michael Goulet
76d341fa09 Upgrade the compiler to edition 2024 2025-02-22 00:01:48 +00:00
Jubilee Young
54ff6e0ad5 compiler: remove rustc_target::spec::abi reexports 2025-02-09 20:45:47 -08:00
klensy
84ce2e129a bumpt compiler and tools to windows 0.59 2025-01-21 16:48:44 +03:00
Jonathan Dönszelmann
efb98b6552
rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structures 2024-12-16 19:08:19 +01:00
bors
6503543d11 Auto merge of #132282 - Noratrieb:it-is-the-end-of-serial, r=cjgillot
Delete the `cfg(not(parallel))` serial compiler

Since it's inception a long time ago, the parallel compiler and its cfgs have been a maintenance burden. This was a necessary evil the allow iteration while not degrading performance because of synchronization overhead.

But this time is over. Thanks to the amazing work by the parallel working group (and the dyn sync crimes), the parallel compiler has now been fast enough to be shipped by default in nightly for quite a while now.
Stable and beta have still been on the serial compiler, because they can't use `-Zthreads` anyways.
But this is quite suboptimal:
- the maintenance burden still sucks
- we're not testing the serial compiler in nightly

Because of these reasons, it's time to end it. The serial compiler has served us well in the years since it was split from the parallel one, but it's over now.

Let the knight slay one head of the two-headed dragon!

#113349

Note that the default is still 1 thread, as more than 1 thread is still fairly broken.

cc `@onur-ozkan` to see if i did the bootstrap field removal correctly, `@SparrowLii` on the sync parts
2024-11-12 15:14:56 +00:00
Noratrieb
505b8e1332 Delete the cfg(not(parallel)) serial compiler
Since it's inception a long time ago, the parallel compiler and its cfgs
have been a maintenance burden. This was a necessary evil the allow
iteration while not degrading performance because of synchronization
overhead.

But this time is over. Thanks to the amazing work by the parallel
working group (and the dyn sync crimes), the parallel compiler has now
been fast enough to be shipped by default in nightly for quite a while
now.
Stable and beta have still been on the serial compiler, because they
can't use `-Zthreads` anyways.
But this is quite suboptimal:
- the maintenance burden still sucks
- we're not testing the serial compiler in nightly

Because of these reasons, it's time to end it. The serial compiler has
served us well in the years since it was split from the parallel one,
but it's over now.

Let the knight slay one head of the two-headed dragon!
2024-11-12 13:38:58 +00:00