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

Check non-trivial use std:: statements #19

Open
hobofan opened this issue Jan 28, 2019 · 0 comments
Open

Check non-trivial use std:: statements #19

hobofan opened this issue Jan 28, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@hobofan
Copy link
Owner

hobofan commented Jan 28, 2019

Anything beyond a module use statement (use std::ops;) or a single item use statement (use std::ops::Add;) is not handled.

What still needs to be implemented:

  • glob use statements: use std::ops::*
  • multi-use statements: use std::ops::{Add, Mul};
  • a mixture of those use std::ops::{self, Add, Mul, fictional_mod::Trait, fictional_mod2::*};

Multi-use statements should be expanded to a list of equivalent single-use statements, on which we can then do further checks.

For glob use statements, we can't expand those (as we don't have enough information about public items in other modules. We can probably still handle those similarly to how we handle module use statements. This makes some assumptions e.g. the items between std::ops::* and core::ops::* stay the same when making replacement suggestions.

@hobofan hobofan added the enhancement New feature or request label Jan 28, 2019
hobofan added a commit that referenced this issue Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant