Files
rust/src
Ralf Jung e135087868 Rollup merge of #72799 - Aaron1011:feature/span-debug, r=petrochenkov
Add `-Z span-debug` to allow for easier debugging of proc macros

Currently, the `Debug` impl for `proc_macro::Span` just prints out
the byte range. This can make debugging proc macros (either as a crate
author or as a compiler developer) very frustrating, since neither the
actual filename nor the `SyntaxContext` is displayed.

This commit adds a perma-unstable flag `-Z span-debug`. When enabled,
the `Debug` impl for `proc_macro::Span` simply forwards directly to
`rustc_span::Span`. Once #72618 is merged, this will start displaying
actual line numbers.

While `Debug` impls are not subject to Rust's normal stability
guarnatees, we probably shouldn't expose any additional information on
stable until `#![feature(proc_macro_span)]` is stabilized. Otherwise,
we would be providing a 'backdoor' way to access information that's
supposed be behind unstable APIs.
2020-06-08 09:55:26 +02:00
..
2020-06-04 14:32:23 -07:00
2020-06-03 15:27:51 -04:00
2020-06-02 20:38:24 +03:00
2020-06-02 20:38:24 +03:00
2020-06-02 20:38:24 +03:00
2020-06-02 20:38:24 +03:00
2020-05-23 12:24:19 +02:00
2020-05-29 11:34:41 -07:00
2020-06-03 15:27:51 -04:00

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

  • rustc and its tests
  • libstd
  • Various submodules for tools, like rustdoc, rls, etc.

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