]> git.lizzy.rs Git - rust.git/commit
check_match: Dereference `ref x` before comparing it and some other type
authorBarosl Lee <vcs@barosl.com>
Wed, 11 Mar 2015 16:36:52 +0000 (01:36 +0900)
committerBarosl Lee <vcs@barosl.com>
Sat, 14 Mar 2015 14:32:57 +0000 (23:32 +0900)
commitedbc0e509f016426f6366fba0d0001bc828bd450
treee3fe12cc24daacc351c72d7d75b5d104c8d7875f
parent766a4e1acc06061a30cf456840a9915526fb681e
check_match: Dereference `ref x` before comparing it and some other type

The arity of `ref x` is always 1, so it needs to be dereferenced before
being compared with some other type whose arity is not 1.

Fixes #23009.
src/librustc/middle/check_match.rs
src/test/compile-fail/match-ref-ice.rs [new file with mode: 0644]