bors ab5b9aecb9 Auto merge of - 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 
2021-01-04 13:23:08 +00:00
..
2020-12-26 18:24:10 +01:00
2020-12-14 22:00:46 -05:00
2020-12-18 22:13:25 +09:00