]> git.lizzy.rs Git - rust.git/commit
Auto merge of #43826 - kennytm:fix-43796-mis-calculated-spans, r=petrochenkov
authorbors <bors@rust-lang.org>
Mon, 14 Aug 2017 19:55:20 +0000 (19:55 +0000)
committerbors <bors@rust-lang.org>
Mon, 14 Aug 2017 19:55:20 +0000 (19:55 +0000)
commitdf511d5548ebb7f971abcd3a5283cb1d37b64596
tree42a65acbeb62b77b5d449db735884896fc46f341
parentf1ca76c4978b793ec2e6332009b1ba84d164eb03
parent60377e48f0416daa9120fd057ce55a0024cc458f
Auto merge of #43826 - kennytm:fix-43796-mis-calculated-spans, r=petrochenkov

Fix "Mis-calculated spans" errors from `-Z save-analysis` + refactoring

Removed the path span extraction methods from `SpanUtils`:

* spans_with_brackets
* spans_for_path_segments
* spans_for_ty_params

Use the `span` fields in `PathSegment` and `TyParam` instead.

(Note that since it processes `ast::Path` not a qualified path (`hir::QPath` / `ast::QSelf`), UFCS path will be flattened: `<Foo as a::b::c::Trait>::D::E::F::g` will be seen as `a::b::c::Trait::D::E::F::g`.)

Fix #43796. Close #41478.

r? @nrc
src/librustc_save_analysis/dump_visitor.rs