]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #40369 - petrochenkov:segspan, r=eddyb
authorCorey Farwell <coreyf@rwell.org>
Sun, 12 Mar 2017 16:48:46 +0000 (12:48 -0400)
committerGitHub <noreply@github.com>
Sun, 12 Mar 2017 16:48:46 +0000 (12:48 -0400)
commit8d1c5700f08a657a15c317084f8807c82a6d8fd8
treeabdbc4d3f992133c106c1ad7dbc13f5d44f9c44a
parentf88b24b34c6d17ebe4014bec5a0f7c2a57c529c7
parentffdcf7486656119328c3c6c1efef408abba3139f
Rollup merge of #40369 - petrochenkov:segspan, r=eddyb

Give spans to individual path segments in AST

And use these spans in path resolution diagnostics.

The spans are spans of identifiers in segments, not whole segments. I'm not sure what spans are more useful in general, but identifier spans are a better fit for resolve errors.

HIR still doesn't have spans.

Fixes https://github.com/rust-lang/rust/pull/38927#discussion_r95336667 https://github.com/rust-lang/rust/pull/38890#issuecomment-271731008

r? @nrc @eddyb
src/librustc_resolve/lib.rs
src/librustc_resolve/macros.rs
src/libsyntax/ast.rs
src/libsyntax/fold.rs
src/libsyntax/parse/parser.rs