rust/src/librustc_save_analysis
Zack M. Davis 4ae89129e1 in which hir::Visibility recalls whence it came (i.e., becomes Spanned)
There are at least a couple (and plausibly even three) diagnostics that
could use the spans of visibility modifiers in order to be reliably
correct (rather than hacking and munging surrounding spans to try to
infer where the visibility keyword must have been).

We follow the naming convention established by the other `Spanned` HIR
nodes: the "outer" type alias gets the "prime" node-type name, the
"inner" enum gets the name suffixed with an underscore, and the variant
names are prefixed with the prime name and `pub use` exported from here
(from HIR).

Thanks to veteran reviewer Vadim Petrochenkov for suggesting this
uniform approach. (A previous draft, based on the reasoning that
`Visibility::Inherited` should not have a span, tried to hack in a named
`span` field on `Visibility::Restricted` and a positional field on
`Public` and `Crate`. This was ... not so uniform.)
2018-06-30 22:41:01 -07:00
..
Cargo.toml save-analysis: handle aliasing imports a bit more nicely 2018-05-15 20:34:17 +12:00
dump_visitor.rs Use Idents for associated item definitions in HIR 2018-06-28 11:04:50 +03:00
json_dumper.rs Emit data::Impl in save-analysis 2018-02-10 03:04:44 +01:00
lib.rs in which hir::Visibility recalls whence it came (i.e., becomes Spanned) 2018-06-30 22:41:01 -07:00
sig.rs Generate the NodeId for existential type in the AST 2018-06-27 11:17:25 +02:00
span_utils.rs AST/HIR: Merge field access expressions for named and numeric fields 2018-04-12 23:02:09 +03:00