about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2014-07-10 14:05:28 -0400
committerBen Gamari <bgamari.foss@gmail.com>2014-07-15 19:34:42 -0400
commit6867d91d20a77ad9be4288829cedec2a8c2b72ba (patch)
treef8dea1f15dc675c65ed8b0b4e05d9a2fa0ba4471 /src/rustllvm/ExecutionEngineWrapper.cpp
parentc6c1a22c563e0840f0efcccfe01a496114ac6ef0 (diff)
downloadrust-6867d91d20a77ad9be4288829cedec2a8c2b72ba.tar.gz
rust-6867d91d20a77ad9be4288829cedec2a8c2b72ba.zip
middle::kind: Don't crash when checking safety of Drop
To verify that a type can satisfy Send
`check_struct_safe_for_destructor` attempts to construct a new `ty::t`
an empty substitution list.

Previously the function would verify that the function has no type
parameters before attempting this. Unfortunately this check would not
catch functions with only regions parameters. In this case, the type
would eventually find its way to the substition engine which would
attempt to perform a substitution on the region parameters. As the
constructed substitution list is empty, this would fail, leading to a
compiler crash.

We fix this by verifying that types have both no type and region
parameters.
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions