about summary refs log tree commit diff
path: root/src/test/ui/proc-macro/debug
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-498/+0
2022-10-04Improve spans when splitting multi-char operator tokens for proc macros.Nicholas Nethercote-18/+18
2022-10-03Add some more operator cases to `dump-debug-span-debug.rs`.Nicholas Nethercote-32/+102
2020-06-08Show `SyntaxContext` in formatted `Span` debug outputAaron Hill-30/+30
This is only really useful in debug messages, so I've switched to calling `span_to_string` in any place that causes a `Span` to end up in user-visible output.
2020-06-04Add `-Z span-debug` to allow for easier debugging of proc macrosAaron Hill-0/+207
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-05-15Add test of proc_macro::TokenStream's DebugDavid Tolnay-0/+221