diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.rs b/tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.rs new file mode 100644 index 000000000..befd768b1 --- /dev/null +++ b/tests/ui/impl-trait/dont-suggest-box-on-empty-else-arm.rs @@ -0,0 +1,9 @@ +fn test() -> impl std::fmt::Debug { + if true { + "boo2" + } else { + //~^ ERROR `if` and `else` have incompatible types + } +} + +fn main() {} |