Skip to content

Commit

Permalink
test-macros: Avoid always producing errors in #[derive(Print)]
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed May 30, 2020
1 parent 74e8046 commit 4d5ce34
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 33 deletions.
3 changes: 2 additions & 1 deletion src/test/ui/proc-macro/auxiliary/test-macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,6 @@ pub fn print_attr(_: TokenStream, input: TokenStream) -> TokenStream {

#[proc_macro_derive(Print, attributes(print_helper))]
pub fn print_derive(input: TokenStream) -> TokenStream {
print_helper(input, "DERIVE")
print_helper(input, "DERIVE");
TokenStream::new()
}
5 changes: 3 additions & 2 deletions src/test/ui/proc-macro/dollar-crate.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// check-pass
// edition:2018
// aux-build:test-macros.rs
// aux-build:dollar-crate-external.rs
Expand All @@ -23,7 +24,7 @@ mod local {
struct A($crate::S);

#[derive(Print)]
struct D($crate::S); //~ ERROR the name `D` is defined multiple times
struct D($crate::S);
};
}

Expand All @@ -33,7 +34,7 @@ mod local {
mod external {
use crate::dollar_crate_external;

dollar_crate_external::external!(); //~ ERROR the name `D` is defined multiple times
dollar_crate_external::external!();
}

fn main() {}
30 changes: 0 additions & 30 deletions src/test/ui/proc-macro/dollar-crate.stderr

This file was deleted.

0 comments on commit 4d5ce34

Please sign in to comment.