rust/src
bors 1d679446b0 Auto merge of #140527 - GuillaumeGomez:doctest-main-fn, r=notriddle
Emit a warning if the doctest `main` function will not be run

Fixes #140310.

I think we could try to go much further like adding a "link" (ie UI annotations) on the `main` function in the doctest. However that will require some more computation, not sure if it's worth it or not. Can still be done in a follow-up if we want it.

For now, this PR does two things:
1. Pass the `DiagCtxt` to the doctest parser to emit the warning.
2. Correctly generate the `Span` to where the doctest is starting (I hope the way I did it isn't too bad either...).

cc `@fmease`
r? `@notriddle`
2025-05-22 08:40:58 +00:00
..
bootstrap Rollup merge of #141283 - Sol-Ell:fix-benchmarking-on-windows, r=Kobzol 2025-05-21 11:28:45 +02:00
build_helper Remove git_repository field from GitConfig 2025-04-23 10:41:20 +02:00
ci Rollup merge of #141280 - Kobzol:docker-rust-lang-cache, r=marcoieni 2025-05-21 15:38:09 +02:00
doc Rollup merge of #141316 - rustbot:docs-update, r=ehuss 2025-05-21 08:05:27 +02:00
etc float: Add f16 to test-float-parse 2025-05-18 16:51:28 +00:00
gcc@04ce66d8c9 Update src/gcc submodule to 04ce66d8c918de9273bd7101638ad8724edf5e21 2025-05-14 18:02:02 +02:00
librustdoc Auto merge of #140527 - GuillaumeGomez:doctest-main-fn, r=notriddle 2025-05-22 08:40:58 +00:00
llvm-project@c1118fdbb3 Update to LLVM 20.1.5 2025-05-16 08:34:16 +08:00
rustc-std-workspace update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustdoc-json-types rustdoc-json: Remove false docs and add test for inline attribute 2025-05-21 19:47:41 +00:00
tools Auto merge of #137198 - tgross35:cfg-match-rename, r=Amanieu 2025-05-22 02:14:23 +00:00
README.md
stage0 update stage0 compiler 2025-05-12 15:33:35 +02:00
version bump version number to 1.89.0 2025-05-09 11:13:08 +02:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

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