]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #78553 - Nadrieril:fix-78549, r=varkor
authorbors <bors@rust-lang.org>
Sun, 1 Nov 2020 14:37:50 +0000 (14:37 +0000)
committerbors <bors@rust-lang.org>
Sun, 1 Nov 2020 14:37:50 +0000 (14:37 +0000)
Fix #78549

Before #78430, this worked because `specialize_constructor` didn't actually care too much which constructor was passed to it unless needed. That PR however handles `&str` as a special case, and I did not anticipate patterns for the `&str` type other than string literals.
I am not very confident there are not other similar oversights left, but hopefully only `&str` was different enough to break my assumptions.

Fixes https://github.com/rust-lang/rust/issues/78549

1  2 
compiler/rustc_mir_build/src/thir/pattern/_match.rs