Move /src/test to /tests
This commit is contained in:
parent
ca855e6e42
commit
cf2dff2b1e
27592 changed files with 0 additions and 0 deletions
12
tests/ui/structs-enums/tuple-struct-constructor-pointer.rs
Normal file
12
tests/ui/structs-enums/tuple-struct-constructor-pointer.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
// run-pass
|
||||
#[derive(PartialEq, Debug)]
|
||||
struct Foo(isize);
|
||||
#[derive(PartialEq, Debug)]
|
||||
struct Bar(isize, isize);
|
||||
|
||||
pub fn main() {
|
||||
let f: fn(isize) -> Foo = Foo;
|
||||
let g: fn(isize, isize) -> Bar = Bar;
|
||||
assert_eq!(f(42), Foo(42));
|
||||
assert_eq!(g(4, 7), Bar(4, 7));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue