Skip to content

Commit

Permalink
Test derive expansion ordering.
Browse files Browse the repository at this point in the history
  • Loading branch information
jseyfried committed Oct 10, 2016
1 parent 60a4b69 commit 448d6ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test/run-pass-fulldeps/macro-crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#[macro_use] #[no_link]
extern crate macro_crate_test;

#[into_multi_foo]
#[derive(PartialEq, Clone, Debug)]
#[into_multi_foo]
fn foo() -> AnotherFakeTypeThatHadBetterGoAway {}

// Check that the `#[into_multi_foo]`-generated `foo2` is configured away
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ use proc_macro::TokenStream;
#[proc_macro_derive(AToB)]
pub fn derive(input: TokenStream) -> TokenStream {
let input = input.to_string();
assert_eq!(input, "struct A;\n");
assert_eq!(input, "#[derive(Copy, Clone)]\nstruct A;\n");
"struct B;".parse().unwrap()
}
1 change: 1 addition & 0 deletions src/test/run-pass-fulldeps/proc-macro/load-two.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ extern crate derive_atob;
#[macro_use]
extern crate derive_ctod;

#[derive(Copy, Clone)]
#[derive(AToB)]
struct A;

Expand Down

0 comments on commit 448d6ad

Please sign in to comment.