diff options
| author | Ralf Jung <post@ralfj.de> | 2020-06-08 09:55:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-08 09:55:26 +0200 |
| commit | e13508786808800b4bc13d49bd5fd1245bc41171 (patch) | |
| tree | 3d13a18ef335b86689aa2ef2ec0b4f0148e8497b /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
| parent | 89d8979c9a6044fcdb0269d5b7cb8600db9bca5c (diff) | |
| parent | b541d3da5d9f89407c7072f4a6d65872cf30a577 (diff) | |
| download | rust-e13508786808800b4bc13d49bd5fd1245bc41171.tar.gz rust-e13508786808800b4bc13d49bd5fd1245bc41171.zip | |
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.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions
