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

Fix FP in single_component_path_imports lint #6905

Merged
merged 4 commits into from
Apr 11, 2021

Conversation

ThibsG
Copy link
Contributor

@ThibsG ThibsG commented Mar 14, 2021

Fix FP in single_component_path_imports lint when the import is reused with self, like in use self::module.

Fixes #5210

changelog: none

@rust-highfive
Copy link

r? @flip1995

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 14, 2021
@ThibsG ThibsG force-pushed the fpSingleComponentPathImports5210 branch from 566384e to 9ecb70a Compare March 14, 2021 19:04
@ThibsG ThibsG marked this pull request as draft March 16, 2021 16:03
@ThibsG ThibsG force-pushed the fpSingleComponentPathImports5210 branch from 9ecb70a to b018bca Compare March 20, 2021 08:05
@ThibsG ThibsG marked this pull request as ready for review March 20, 2021 08:16
@ThibsG ThibsG force-pushed the fpSingleComponentPathImports5210 branch from b018bca to 47f2c84 Compare March 20, 2021 08:17
@flip1995
Copy link
Member

r? @giraffate

@rust-highfive rust-highfive assigned giraffate and unassigned flip1995 Mar 23, 2021
@giraffate giraffate added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Mar 24, 2021
@ThibsG ThibsG force-pushed the fpSingleComponentPathImports5210 branch from 9ce739a to 6985d13 Compare March 28, 2021 07:43
@giraffate giraffate added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Mar 29, 2021
@giraffate giraffate added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Mar 29, 2021
@giraffate giraffate added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Apr 5, 2021
@giraffate
Copy link
Contributor

@bors r+

It looks good, thanks!

@bors
Copy link
Contributor

bors commented Apr 5, 2021

📌 Commit 81dfb9e has been approved by giraffate

bors added a commit that referenced this pull request Apr 5, 2021
…ffate

Fix FP in `single_component_path_imports` lint

Fix FP in  `single_component_path_imports` lint when the import is reused with `self`, like in `use self::module`.

Fixes #5210

changelog: none
@bors
Copy link
Contributor

bors commented Apr 5, 2021

⌛ Testing commit 81dfb9e with merge 067cc44...

@bors
Copy link
Contributor

bors commented Apr 5, 2021

💥 Test timed out

@giraffate
Copy link
Contributor

@bors retry

bors added a commit that referenced this pull request Apr 6, 2021
…ffate

Fix FP in `single_component_path_imports` lint

Fix FP in  `single_component_path_imports` lint when the import is reused with `self`, like in `use self::module`.

Fixes #5210

changelog: none
@bors
Copy link
Contributor

bors commented Apr 6, 2021

⌛ Testing commit 81dfb9e with merge 6a92cb7...

@bors
Copy link
Contributor

bors commented Apr 6, 2021

💔 Test failed - checks-action_test

@giraffate
Copy link
Contributor

@bors retry

bors added a commit that referenced this pull request Apr 6, 2021
…ffate

Fix FP in `single_component_path_imports` lint

Fix FP in  `single_component_path_imports` lint when the import is reused with `self`, like in `use self::module`.

Fixes #5210

changelog: none
@bors
Copy link
Contributor

bors commented Apr 6, 2021

⌛ Testing commit 81dfb9e with merge 52d21be...

@bors
Copy link
Contributor

bors commented Apr 6, 2021

💔 Test failed - checks-action_test

@giraffate
Copy link
Contributor

Oh, the test fails because of ICE, I missed it. I will check it later.

@djc
Copy link
Contributor

djc commented Apr 7, 2021

Did this also the fix the case of use crate::foo? That is, I have the following:

lib.rs:

#[cfg(foo)]
use log;

#[cfg(not(foo))]
#[macro_use]
mod log {
    macro_rules! error    ( ($($tt:tt)*) => {{}} );
};

mod inner {
    use crate::log::error;
}

@ThibsG
Copy link
Contributor Author

ThibsG commented Apr 10, 2021

@djc, no I don't think this case is handled, but feel free to provide a playground, and I will take a look at this.

@giraffate
Copy link
Contributor

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Apr 11, 2021

📌 Commit 297e84f has been approved by giraffate

@bors
Copy link
Contributor

bors commented Apr 11, 2021

⌛ Testing commit 297e84f with merge 67fad01...

@bors
Copy link
Contributor

bors commented Apr 11, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing 67fad01 to master...

@bors bors merged commit 67fad01 into rust-lang:master Apr 11, 2021
@ThibsG ThibsG deleted the fpSingleComponentPathImports5210 branch April 11, 2021 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FP single_component_path_imports
6 participants