diff options
| author | Daniel Noom <ggatw@outlook.com> | 2021-01-03 14:13:33 +0100 |
|---|---|---|
| committer | Daniel Noom <ggatw@outlook.com> | 2021-01-03 19:05:23 +0100 |
| commit | 998bf0ab88a372c1b19dd367c1fe6f51728b87eb (patch) | |
| tree | 6114960da123901bbbb3b31606b06692f2df8bd4 /library/std/src/sys/unix/stack_overflow.rs | |
| parent | 18cb4ad3b9440b3ff2ed16976f56889b23811e13 (diff) | |
| download | rust-998bf0ab88a372c1b19dd367c1fe6f51728b87eb.tar.gz rust-998bf0ab88a372c1b19dd367c1fe6f51728b87eb.zip | |
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 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
