diff options
| author | gnzlbg <gnzlbg@users.noreply.github.com> | 2018-03-22 17:09:01 +0100 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-03-22 11:09:01 -0500 |
| commit | 56d9a42a2fd623edce8e9bb0a07255e5f3494c2a (patch) | |
| tree | 70daf737746fcc2c8e8a90017723f8b251bfdfc0 /library/stdarch/crates/assert-instr-macro | |
| parent | db819cb9320d55afc34085f7ea2b16f39e715cf4 (diff) | |
| download | rust-56d9a42a2fd623edce8e9bb0a07255e5f3494c2a.tar.gz rust-56d9a42a2fd623edce8e9bb0a07255e5f3494c2a.zip | |
add tests for endian-dependent behavior (#394)
* add tests for endian-dependent behavior * format
Diffstat (limited to 'library/stdarch/crates/assert-instr-macro')
| -rw-r--r-- | library/stdarch/crates/assert-instr-macro/src/lib.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/library/stdarch/crates/assert-instr-macro/src/lib.rs b/library/stdarch/crates/assert-instr-macro/src/lib.rs index 5066d0bbcd4..6abbd1a6376 100644 --- a/library/stdarch/crates/assert-instr-macro/src/lib.rs +++ b/library/stdarch/crates/assert-instr-macro/src/lib.rs @@ -62,7 +62,11 @@ pub fn assert_instr( syn::Pat::Ident(ref i) => &i.ident, _ => panic!("must have bare arguments"), }; - match invoc.args.iter().find(|a| a.0 == ident.as_ref()) { + match invoc + .args + .iter() + .find(|a| a.0 == ident.as_ref()) + { Some(&(_, ref tts)) => { input_vals.push(quote! { #tts }); } @@ -116,8 +120,9 @@ pub fn assert_instr( } }.into(); // why? necessary now to get tests to work? - let tts: TokenStream = - tts.to_string().parse().expect("cannot parse tokenstream"); + let tts: TokenStream = tts.to_string() + .parse() + .expect("cannot parse tokenstream"); let tts: TokenStream = quote! { #item |
