about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-06-08 09:55:26 +0200
committerGitHub <noreply@github.com>2020-06-08 09:55:26 +0200
commite13508786808800b4bc13d49bd5fd1245bc41171 (patch)
tree3d13a18ef335b86689aa2ef2ec0b4f0148e8497b /src/test/codegen/src-hash-algorithm
parent89d8979c9a6044fcdb0269d5b7cb8600db9bca5c (diff)
parentb541d3da5d9f89407c7072f4a6d65872cf30a577 (diff)
downloadrust-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')
0 files changed, 0 insertions, 0 deletions