diff options
| author | bors <bors@rust-lang.org> | 2021-01-04 13:23:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-01-04 13:23:08 +0000 |
| commit | ab5b9aecb9656a6d6e61fc7c14e4f1fe438dde56 (patch) | |
| tree | 75fd2c4bd5bddefb4f3f2535f9953276ff25de22 /compiler/rustc_codegen_llvm/src | |
| parent | 6163bfdcce6404c5d61d6ab441bf49a831082194 (diff) | |
| parent | 914bc1717877b7f2520e7b95435ee70742a14ba3 (diff) | |
| download | rust-ab5b9aecb9656a6d6e61fc7c14e4f1fe438dde56.tar.gz rust-ab5b9aecb9656a6d6e61fc7c14e4f1fe438dde56.zip | |
Auto merge of #80651 - GroteGnoom:issue-78123-fix, r=Nadrieril
Add note to non-exhaustive match on reference to empty Rust prints "type `&A` is non-empty" even is A is empty. This is the intended behavior, but can be confusing. This commit adds a note to non-exhaustive pattern errors if they are a reference to something uninhabited. I did not add tests to check that the note is not shown for non-references or inhabited references, because this is already done in other tests. Maybe the added test is superfluous, because `always-inhabited-union-ref` already checks for this case. This does not handle &&Void or &&&void etc. I could add those as special cases as well and ignore people who need quadruple references. Fixes #78123
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
