2020-02-15 06:13:20 -06:00
|
|
|
error[E0004]: non-exhaustive patterns: type `&!` is non-empty
|
2018-11-20 15:33:57 -06:00
|
|
|
--> $DIR/always-inhabited-union-ref.rs:23:11
|
2018-11-20 14:44:39 -06:00
|
|
|
|
|
|
|
|
LL | match uninhab_ref() {
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
2020-03-27 00:44:30 -05:00
|
|
|
= note: the matched value is of type `&!`
|
2021-01-03 07:13:33 -06:00
|
|
|
= note: references are always considered inhabited
|
2021-12-16 16:46:13 -06:00
|
|
|
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
|
2021-12-15 20:05:58 -06:00
|
|
|
|
|
|
|
|
LL ~ match uninhab_ref() {
|
|
|
|
LL + _ => todo!(),
|
|
|
|
LL + }
|
|
|
|
|
|
2018-11-20 14:44:39 -06:00
|
|
|
|
2019-12-03 08:08:14 -06:00
|
|
|
error[E0004]: non-exhaustive patterns: type `Foo` is non-empty
|
2018-11-20 15:33:57 -06:00
|
|
|
--> $DIR/always-inhabited-union-ref.rs:27:11
|
2018-11-20 14:44:39 -06:00
|
|
|
|
|
2021-12-15 23:06:44 -06:00
|
|
|
LL | match uninhab_union() {
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2018-11-20 14:44:39 -06:00
|
|
|
|
|
2021-12-15 23:06:44 -06:00
|
|
|
note: `Foo` defined here
|
|
|
|
--> $DIR/always-inhabited-union-ref.rs:10:11
|
|
|
|
|
|
|
|
|
LL | pub union Foo {
|
|
|
|
| ^^^
|
2020-03-27 00:44:30 -05:00
|
|
|
= note: the matched value is of type `Foo`
|
2021-12-16 16:46:13 -06:00
|
|
|
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
|
2021-12-15 20:05:58 -06:00
|
|
|
|
|
|
|
|
LL ~ match uninhab_union() {
|
|
|
|
LL + _ => todo!(),
|
|
|
|
LL + }
|
|
|
|
|
|
2018-11-20 14:44:39 -06:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0004`.
|