1 // build-pass (FIXME(62277): could be check-pass?)
2 #![allow(unused_macros)]
6 type History = Vec<&'static str>;
8 fn wrap<A>(x:A, which: &'static str, history: &mut History) -> A {
14 ( $output_constraint:tt ) => {
19 let mut history: History = vec![];
22 : $output_constraint (*wrap(&mut x, "out", &mut history))
23 : "r"(&wrap(y, "in", &mut history))
26 assert_eq!((x,y), (1,1));
27 let b: &[_] = &["out", "in"];
28 assert_eq!(history, b);
33 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
35 fn out_write_only_expr_then_in_expr() {
39 fn out_read_write_expr_then_in_expr() {
43 out_write_only_expr_then_in_expr();
44 out_read_write_expr_then_in_expr();
47 #[cfg(all(not(target_arch = "x86"), not(target_arch = "x86_64")))]