mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Test derive expansion ordering.
This commit is contained in:
parent
60a4b69ec0
commit
448d6ad72e
@ -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
|
||||
|
@ -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()
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ extern crate derive_atob;
|
||||
#[macro_use]
|
||||
extern crate derive_ctod;
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(AToB)]
|
||||
struct A;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user