<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/ui/proc-macro/debug/dump-debug-span-debug.stderr, branch 1.48.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.48.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.48.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-06-09T01:47:33+00:00</updated>
<entry>
<title>Show `SyntaxContext` in formatted `Span` debug output</title>
<updated>2020-06-09T01:47:33+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2020-06-05T03:05:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=88262984eb623f683e61e657363459550ba93199'/>
<id>urn:sha1:88262984eb623f683e61e657363459550ba93199</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Add `-Z span-debug` to allow for easier debugging of proc macros</title>
<updated>2020-06-04T19:39:12+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2020-05-31T20:20:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b541d3da5d9f89407c7072f4a6d65872cf30a577'/>
<id>urn:sha1:b541d3da5d9f89407c7072f4a6d65872cf30a577</id>
<content type='text'>
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.
</content>
</entry>
</feed>
