Navigation Menu

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

phansch
Copy link
Member

@phansch 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
Copy link
Contributor

oli-obk commented Feb 1, 2019

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 1, 2019

📌 Commit d1b1568 has been approved by oli-obk

@bors

This comment has been minimized.

@bors

This comment has been minimized.

@phansch phansch added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Feb 1, 2019
tests/ui/vec_box_sized.rs Outdated Show resolved Hide resolved
`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
Copy link
Member Author

phansch commented Feb 1, 2019

@bors r=oli-obk

@bors
Copy link
Collaborator

bors commented Feb 1, 2019

📌 Commit 38347ba has been approved by oli-obk

@bors
Copy link
Collaborator

bors commented Feb 1, 2019

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

bors added a commit that referenced this pull request Feb 1, 2019
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
Copy link
Collaborator

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
@phansch phansch deleted the fix_ice_3720 branch February 2, 2019 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE with simple struct
3 participants