diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-02-10 16:42:53 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-02-21 14:50:51 +0000 |
| commit | 88a7b6803b7791febe1cdeb0f66f01b3b6b75af6 (patch) | |
| tree | fc88ffa75f5a4d042c9b4ccabf7e13bedc799ace /tests | |
| parent | bda32a4023b1d3f96e56e1b2fc7510324f430316 (diff) | |
| download | rust-88a7b6803b7791febe1cdeb0f66f01b3b6b75af6.tar.gz rust-88a7b6803b7791febe1cdeb0f66f01b3b6b75af6.zip | |
Make hidden type registration opt-in, so that each site can be reviewed on its own and we have the right defaults for trait solvers
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/type-alias-impl-trait/match-unification.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/type-alias-impl-trait/match-unification.rs b/tests/ui/type-alias-impl-trait/match-unification.rs new file mode 100644 index 00000000000..f5c2abc0efa --- /dev/null +++ b/tests/ui/type-alias-impl-trait/match-unification.rs @@ -0,0 +1,14 @@ +use std::fmt::Debug; + +// check-pass + +fn bar() -> impl Debug {} + +fn baz(b: bool) -> Option<impl Debug> { + match b { + true => baz(false), + false => Some(bar()), + } +} + +fn main() {} |
