Move some tests to more suitable subdirs

This commit is contained in:
Yuki Okushi 2021-03-05 18:34:12 +09:00
parent 45b3c28518
commit eb9abea295
35 changed files with 1 additions and 46 deletions

View file

@ -1,14 +0,0 @@
// run-pass
// pretty-expanded FIXME #23616
#![feature(box_syntax)]
fn a_val(x: Box<isize>, y: Box<isize>) -> isize {
*x + *y
}
pub fn main() {
let z: Box<_> = box 22;
a_val(z.clone(), z.clone());
}

View file

@ -1,31 +0,0 @@
// run-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
#[derive(Copy, Clone)]
struct cat {
meow: extern "Rust" fn(),
}
fn meow() {
println!("meow")
}
fn cat() -> cat {
cat {
meow: meow,
}
}
#[derive(Copy, Clone)]
struct KittyInfo {kitty: cat}
// Code compiles and runs successfully if we add a + before the first arg
fn nyan(kitty: cat, _kitty_info: KittyInfo) {
(kitty.meow)();
}
pub fn main() {
let kitty = cat();
nyan(kitty, KittyInfo {kitty: kitty});
}