rust/src/librustc_interface
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
..
build.rs Locate rustc binary similarly to codegen backend loading 2019-09-10 16:57:14 -04:00
callbacks.rs Query-ify Instance::resolve 2020-04-05 01:21:36 -04:00
Cargo.toml Make things build again 2020-06-02 20:38:24 +03:00
interface.rs Make SourceMap available for early debug-printing of Spans 2020-05-31 17:30:55 -04:00
lib.rs Depend on libc from crates.io 2020-04-11 11:07:04 -04:00
passes.rs Add -Z span-debug to allow for easier debugging of proc macros 2020-06-04 15:39:12 -04:00
proc_macro_decls.rs librustc_middle: return LocalDefId instead of DefId in local_def_id 2020-04-23 23:14:07 +01:00
queries.rs Use OnceCell instead of Once 2020-05-22 13:31:02 -07:00
tests.rs Add -Z span-debug to allow for easier debugging of proc macros 2020-06-04 15:39:12 -04:00
util.rs rustc_session: Cleanup session creation 2020-05-27 22:32:24 +03:00