Skip to content

Commit 00f8610

Browse files
committed
Add a test
1 parent 106625b commit 00f8610

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/source/macros.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,12 @@ fn __bindgen_test_layout_HandleWithDtor_open0_int_close0_instantiation() {
189189
);
190190
assert_eq ! ( :: std :: mem :: align_of :: < HandleWithDtor < :: std :: os :: raw :: c_int > > ( ) , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( HandleWithDtor < :: std :: os :: raw :: c_int > ) ) );
191191
}
192+
193+
// #878
194+
macro_rules! try_opt {
195+
($expr:expr) => (match $expr {
196+
Some(val) => val,
197+
198+
None => { return None; }
199+
})
200+
}

tests/target/macros.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,12 @@ fn __bindgen_test_layout_HandleWithDtor_open0_int_close0_instantiation() {
240240
)
241241
);
242242
}
243+
244+
// #878
245+
macro_rules! try_opt {
246+
($expr:expr) => (match $expr {
247+
Some(val) => val,
248+
249+
None => { return None; }
250+
})
251+
}

0 commit comments

Comments
 (0)