1
Fork 0

Add regression tests

This commit is contained in:
Oli Scherer 2022-05-05 08:14:35 +00:00
parent 12d3f107c1
commit c227d85021
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,10 @@
// check-pass
#![feature(type_alias_impl_trait)]
fn main() {
type T = impl Copy;
let foo: T = (1u32, 2u32);
let x: (_, _) = foo;
println!("{:?}", x);
}

View file

@ -0,0 +1,14 @@
// check-pass
fn foo(b: bool) -> impl Copy {
if b {
return (5,6)
}
let x: (_, _) = foo(true);
println!("{:?}", x);
(1u32, 2u32)
}
fn main() {
foo(false);
}