rust/src
bors 18bd2dd5cd Auto merge of #96853 - davidtwco:diagnostic-translation-unit-and-more-porting, r=oli-obk
diagnostics: port more diagnostics to derive + support for `()` fields

- Extend diagnostic derive so that spanless subdiagnostics (e.g. some uses of `help`/`note`) can be applied via attributes to fields of type `()` (currently spanless subdiagnostics are applied via attributes on the diagnostic struct itself). A consequence of this is that `Option<()>` fields can be used to represent optional spanless subdiagnostics, which are sometimes useful (e.g. for a `help` that should only show on nightly builds).
- Simplify the "explicit generic args with impl trait" diagnostic struct (from #96760) using support for `Option<()>` spanless subdiagnostics.
- Change `DiagnosticBuilder::set_arg`, used to provide context for Fluent messages, so that it takes anything that implements `IntoDiagnosticArg`, rather than `DiagnosticArgValue` - this improves the ergonomics of manual implementations of `SessionDiagnostic` which are translatable.
- Port "the type parameter `T` must be explicitly specified", "manual implementations of `X` are experimental", "could not resolve substs on overridden impl" diagnostics to diagnostic structs.
- When testing macros from `rustc_macros` in `ui-fulldeps` tests, sometimes paths from the compiler source tree can be shown in error messages - these need to be normalized in `compiletest`.

r? `@oli-obk`
cc `@pvdrz`
2022-05-12 10:22:07 +00:00
..
bootstrap Auto merge of #96375 - jyn514:bootstrap-submodules, r=Mark-Simulacrum 2022-05-11 00:41:50 +00:00
ci Auto merge of #96689 - gimbles:campfire, r=Mark-Simulacrum 2022-05-08 11:14:47 +00:00
doc Update books 2022-05-10 22:27:45 -07:00
etc Store all generic bounds as where predicates. 2022-04-30 13:55:13 +02:00
librustdoc Rollup merge of #91518 - luojia65:rustdoc-riscv-arch, r=GuillaumeGomez 2022-05-11 13:49:27 +02:00
llvm-project@593484fc15 chore: Upgrade llvm-project 2022-05-09 09:39:29 +02:00
rustdoc-json-types rustdoc-json-types: implementors -> implementations 2022-03-14 00:05:11 +00:00
test Auto merge of #96853 - davidtwco:diagnostic-translation-unit-and-more-porting, r=oli-obk 2022-05-12 10:22:07 +00:00
tools compiletest: normalize paths from repository root 2022-05-12 07:21:51 +01:00
README.md
stage0.json bump stage0 to the latest beta 2022-04-05 22:24:32 +02:00
version bump version to 1.62.0 2022-04-04 09:21:03 +02:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.