Skip to content

Associate each path in a use declaration with the item in the AST map #25791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2015

Conversation

barosl
Copy link
Contributor

@barosl barosl commented May 26, 2015

Currently, for use declarations with multiple paths, only the use item itself is saved in the AST map, not the individual path nodes. This can lead to a problem when a span of a specific path node is needed.

For example, #24818 caused an ICE because of this, in ImportResolver::check_for_conflicting_import().

Fixes #25763.

@rust-highfive
Copy link
Contributor

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

Currently, for `use` declarations with multiple paths, only the `use`
item itself is saved in the AST map, not the individual path nodes. This
can lead to a problem when a span of a specific path node is needed.

For example, rust-lang#24818 caused an ICE because of this, in
`ImportResolver::check_for_conflicting_import()`.

Fixes rust-lang#25763.
@barosl barosl force-pushed the use-paths-as-items branch from 7196979 to 0ae30e6 Compare May 26, 2015 08:43
@alexcrichton
Copy link
Member

@bors: r+ 0ae30e6

Thanks!

@bors
Copy link
Collaborator

bors commented May 27, 2015

⌛ Testing commit 0ae30e6 with merge a2cf2c6...

bors added a commit that referenced this pull request May 27, 2015
Currently, for `use` declarations with multiple paths, only the `use` item itself is saved in the AST map, not the individual path nodes. This can lead to a problem when a span of a specific path node is needed.

For example, #24818 caused an ICE because of this, in `ImportResolver::check_for_conflicting_import()`.

Fixes #25763.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE - importing a module twice, once via glob
5 participants