diff options
Diffstat (limited to 'src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs')
-rw-r--r-- | src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs b/src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs deleted file mode 100644 index 2bd8146e2..000000000 --- a/src/test/ui/mismatched_types/suggest-boxed-trait-objects-instead-of-impl-trait.rs +++ /dev/null @@ -1,28 +0,0 @@ -// run-rustfix - -#![allow(dead_code)] - -struct S; -struct Y; - -trait Trait {} - -impl Trait for S {} -impl Trait for Y {} - -fn foo() -> impl Trait { - if true { - S - } else { - Y //~ ERROR `if` and `else` have incompatible types - } -} - -fn bar() -> impl Trait { - match true { - true => S, - false => Y, //~ ERROR `match` arms have incompatible types - } -} - -fn main() {} |