about summary refs log tree commit diff
path: root/src/test/codegen/gdb_debug_script_load.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-19 10:18:52 +0000
committerbors <bors@rust-lang.org>2018-01-19 10:18:52 +0000
commit5965b790142eff7a8546e947914e7a8e00c61575 (patch)
treeb847a01aee36a41a06f104edc2c75ac30a4b0ab5 /src/test/codegen/gdb_debug_script_load.rs
parentb71cbd8443990efa2b697f7eedfd825fd3f7b0b1 (diff)
parent06e32d044d72bea2859d741b4d5bf8775e326185 (diff)
downloadrust-5965b790142eff7a8546e947914e7a8e00c61575.tar.gz
rust-5965b790142eff7a8546e947914e7a8e00c61575.zip
Auto merge of #47503 - arielb1:check-size, r=eddyb
avoid double-unsizing arrays in bytestring match lowering

The match lowering code, when lowering matches against bytestrings,
works by coercing both the scrutinee and the pattern to `&[u8]` and
then comparing them using `<[u8] as Eq>::eq`.

If the scrutinee is already of type `&[u8]`, then unsizing it is both
unneccessary and a trait error caught by the new and updated MIR typeck,
so this PR changes lowering to avoid doing that (match lowering tried to
avoid that before, but that attempt was quite broken).

Fixes #46920.

r? @eddyb
Diffstat (limited to 'src/test/codegen/gdb_debug_script_load.rs')
0 files changed, 0 insertions, 0 deletions