about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-04-08 14:05:06 +0000
committerbors <bors@rust-lang.org>2017-04-08 14:05:06 +0000
commita61011761deeab9e308e6d103b1dc7aaf334f6e3 (patch)
treead81d56b54b321b5afb8f9aa29e593f2cd13b351 /src/rustllvm/PassWrapper.cpp
parentfe39e94d6cd6eba00b3aadf323b3f4d029aad7eb (diff)
parentc9932b395ada3c367aea5e79645c10657262ea6f (diff)
downloadrust-a61011761deeab9e308e6d103b1dc7aaf334f6e3.tar.gz
rust-a61011761deeab9e308e6d103b1dc7aaf334f6e3.zip
Auto merge of #41055 - Archytaus:compile-fail/const-match-pattern-arm, r=arielb1
Fixed ICEs with pattern matching in const expression

Fixed 2 ICEs with when pattern matching inside a constant expression.

Both of these ICEs now resolve to an appropriate compiler error.

1. ICE was caused by a compiler bug to implement discriminant const qualify.

    I removed this intentionally thrown bug and changed it to a FIXME as the unimplemented expression type is handled as a compiler error elsewhere.

2. ICE was caused during a drop check when checking if a variable lifetime outlives the current scope if there was no parent scope .

    I've changed it to stop checking if there is no parent scope for the current scope. It is valid syntax for a const variable to be assigned a match expression with no enclosing scope.

    The ICE seemed to mainly be used as a defensive check for bugs elsewhere.

Fixes #38199.
Fixes #31577.
Fixes #29093.
Fixes #40012.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions