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 ICE in use_self lint #4671

Merged
merged 3 commits into from
Oct 15, 2019
Merged

Fix ICE in use_self lint #4671

merged 3 commits into from
Oct 15, 2019

Conversation

flip1995
Copy link
Member

The ICE is produced by building this span:

let last_segment = last_segment.unwrap_or_else(|| path.segments.last().expect(SEGMENTS_MSG));
// Path segments only include actual path, no methods or fields.
let last_path_span = last_segment.ident.span;
// Only take path up to the end of last_path_span.
let span = path.span.with_hi(last_path_span.hi());

span can start in the file the macro is defined in and end where the macro is called.

changelog: Fix ICE in use_self lint

@flip1995 flip1995 changed the title Add regression test for ICE in use-self lint WIP: Add regression test for ICE in use-self lint Oct 15, 2019
@flip1995 flip1995 changed the title WIP: Add regression test for ICE in use-self lint WIP: Fix ICE in use_self lint Oct 15, 2019
@flip1995 flip1995 added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 15, 2019
@flip1995 flip1995 changed the title WIP: Fix ICE in use_self lint Fix ICE in use_self lint Oct 15, 2019
@flip1995
Copy link
Member Author

@bors try

bors added a commit that referenced this pull request Oct 15, 2019
Fix ICE in `use_self` lint

The ICE is produced by building this span:
https://github.com/rust-lang/rust-clippy/blob/55e7818a06c8d83bead9c81e10e73ba33fb20890/clippy_lints/src/use_self.rs#L55-L60

`span` can start in the file the macro is defined in and end where the macro is called.

changelog: Fix ICE in `use_self` lint
@bors
Copy link
Collaborator

bors commented Oct 15, 2019

⌛ Trying commit 2f10807 with merge 8025c14...

@flip1995
Copy link
Member Author

Let's see, if we can enable the currently disabled integration tests (2f10807)

@bors
Copy link
Collaborator

bors commented Oct 15, 2019

☀️ Try build successful - checks-travis, status-appveyor
Build commit: 8025c14 (8025c149578eee3aece62ad045bfa03d1c102c39)

@phansch
Copy link
Member

phansch commented Oct 15, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 15, 2019

📌 Commit 2f10807 has been approved by phansch

@bors
Copy link
Collaborator

bors commented Oct 15, 2019

⌛ Testing commit 2f10807 with merge 778ace3...

bors added a commit that referenced this pull request Oct 15, 2019
Fix ICE in `use_self` lint

The ICE is produced by building this span:
https://github.com/rust-lang/rust-clippy/blob/55e7818a06c8d83bead9c81e10e73ba33fb20890/clippy_lints/src/use_self.rs#L55-L60

`span` can start in the file the macro is defined in and end where the macro is called.

changelog: Fix ICE in `use_self` lint
@bors
Copy link
Collaborator

bors commented Oct 15, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: phansch
Pushing 778ace3 to master...

@bors bors merged commit 2f10807 into rust-lang:master Oct 15, 2019
@flip1995 flip1995 deleted the ice-4671 branch October 16, 2019 07:09
@flip1995 flip1995 mentioned this pull request Oct 27, 2019
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.

None yet

3 participants