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 vec_box lint and add run-rustfix #3732

Merged
merged 2 commits into from Feb 2, 2019

Conversation

Projects
None yet
3 participants
@phansch
Copy link
Collaborator

phansch commented Feb 1, 2019

Includes #3726

hir::Ty doesn't seem to know anything about type bounds and
cx.tcx.type_of(def_id) caused an ICE when it was passed a generic type
with a bound:

src/librustc_typeck/collect.rs:1311: unexpected non-type Node::GenericParam: Type { default: None, synthetic: None }

Converting it to a proper Ty fixes the ICE and catches a few more places
where the lint applies.

Fixes #3720

@oli-obk

This comment has been minimized.

Copy link
Collaborator

oli-obk commented Feb 1, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 1, 2019

📌 Commit d1b1568 has been approved by oli-obk

@bors

This comment was marked as outdated.

Copy link
Contributor

bors commented Feb 1, 2019

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout fix_ice_3720 (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self fix_ice_3720 --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging clippy_lints/src/types.rs
CONFLICT (content): Merge conflict in clippy_lints/src/types.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors

This comment was marked as outdated.

Copy link
Contributor

bors commented Feb 1, 2019

☔️ The latest upstream changes (presumably #3726) made this pull request unmergeable. Please resolve the merge conflicts.

Show resolved Hide resolved tests/ui/vec_box_sized.rs Outdated

phansch added some commits Feb 1, 2019

Fix ICE in vec_box lint and add run-rustfix
`hir::Ty` doesn't seem to know anything about type bounds and
`cx.tcx.type_of(def_id)` caused an ICE when it was passed a generic type
with a bound:

```
src/librustc_typeck/collect.rs:1311: unexpected non-type Node::GenericParam: Type { default: None, synthetic: None }
```

Converting it to a proper `Ty` fixes the ICE and catches a few more
places where the lint applies.

@phansch phansch force-pushed the phansch:fix_ice_3720 branch from d1b1568 to 38347ba Feb 1, 2019

@phansch

This comment has been minimized.

Copy link
Collaborator Author

phansch commented Feb 1, 2019

@bors r=oli-obk

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 1, 2019

📌 Commit 38347ba has been approved by oli-obk

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 1, 2019

⌛️ Testing commit 38347ba with merge 2972d54...

bors added a commit that referenced this pull request Feb 1, 2019

Auto merge of #3732 - phansch:fix_ice_3720, r=oli-obk
Fix ICE in vec_box lint and add run-rustfix

Includes #3726

`hir::Ty` doesn't seem to know anything about type bounds and
`cx.tcx.type_of(def_id)` caused an ICE when it was passed a generic type
with a bound:

```
src/librustc_typeck/collect.rs:1311: unexpected non-type Node::GenericParam: Type { default: None, synthetic: None }
```

Converting it to a proper `Ty` fixes the ICE and catches a few more places
where the lint applies.

Fixes #3720
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 2, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: oli-obk
Pushing 2972d54 to master...

@bors bors merged commit 38347ba into rust-lang:master Feb 2, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details

@phansch phansch deleted the phansch:fix_ice_3720 branch Feb 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.