Skip to content
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

Improve/add use_item documentation #256

Merged
merged 2 commits into from
Dec 6, 2018
Merged

Conversation

DJMcNab
Copy link
Contributor

@DJMcNab DJMcNab commented Dec 5, 2018

Adds some documentation to use_item explaining all code paths (use imports are hard, especially with the ongoing discussion of anchored v. uniform paths - see rust-lang/rust#55618 for what appears to be the latest developments)

Copy link
Member

@matklad matklad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

// Parse `use ::*;`, which imports all from the crate root in Rust 2015
// This is invalid inside a use_tree_list, (e.g. `use some::path::{::*}`)
// but still parses and errors later: ('crate root in paths can only be used in start position')
// TODO: Add this error (if not out of scope)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it was just an overall comment that it was something that naturally comes up there, but should be added somewhere else.

@matklad
Copy link
Member

matklad commented Dec 5, 2018

Excellent, thanks!

bors r+

bors bot added a commit that referenced this pull request Dec 5, 2018
253: Fix diagnostic fixes showing up everywhere r=matklad a=flodiebold

The LSP code action request always returned the fixes for all diagnostics anywhere in the file, because of a shadowed variable.


There's no test yet; I wasn't sure where to add it. I tried adding one in `heavy_tests`, but that's a bit uncomfortable because the code action response contains the (random) file paths. I could make it work, but wanted to ask beforehand what you think.

256: Improve/add use_item documentation r=matklad a=DJMcNab

Adds some documentation to use_item explaining all code paths (use imports are hard, especially with the ongoing discussion of anchored v. uniform paths - see rust-lang/rust#55618 for what appears to be the latest developments)

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
@bors
Copy link
Contributor

bors bot commented Dec 5, 2018

Build failed (retrying...)

@bors
Copy link
Contributor

bors bot commented Dec 5, 2018

Canceled

@matklad
Copy link
Member

matklad commented Dec 6, 2018

bors r+

bors bot added a commit that referenced this pull request Dec 6, 2018
256: Improve/add use_item documentation r=matklad a=DJMcNab

Adds some documentation to use_item explaining all code paths (use imports are hard, especially with the ongoing discussion of anchored v. uniform paths - see rust-lang/rust#55618 for what appears to be the latest developments)

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
@bors
Copy link
Contributor

bors bot commented Dec 6, 2018

Build succeeded

@bors bors bot merged commit 455ef94 into rust-lang:master Dec 6, 2018
@DJMcNab DJMcNab deleted the docs/use_item branch December 6, 2018 17:36
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.

2 participants