Skip to content

Commit 4d5ce34

Browse files
committed
test-macros: Avoid always producing errors in #[derive(Print)]
1 parent 74e8046 commit 4d5ce34

File tree

3 files changed

+5
-33
lines changed

3 files changed

+5
-33
lines changed

src/test/ui/proc-macro/auxiliary/test-macros.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,6 @@ pub fn print_attr(_: TokenStream, input: TokenStream) -> TokenStream {
108108

109109
#[proc_macro_derive(Print, attributes(print_helper))]
110110
pub fn print_derive(input: TokenStream) -> TokenStream {
111-
print_helper(input, "DERIVE")
111+
print_helper(input, "DERIVE");
112+
TokenStream::new()
112113
}

src/test/ui/proc-macro/dollar-crate.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// check-pass
12
// edition:2018
23
// aux-build:test-macros.rs
34
// aux-build:dollar-crate-external.rs
@@ -23,7 +24,7 @@ mod local {
2324
struct A($crate::S);
2425

2526
#[derive(Print)]
26-
struct D($crate::S); //~ ERROR the name `D` is defined multiple times
27+
struct D($crate::S);
2728
};
2829
}
2930

@@ -33,7 +34,7 @@ mod local {
3334
mod external {
3435
use crate::dollar_crate_external;
3536

36-
dollar_crate_external::external!(); //~ ERROR the name `D` is defined multiple times
37+
dollar_crate_external::external!();
3738
}
3839

3940
fn main() {}

src/test/ui/proc-macro/dollar-crate.stderr

-30
This file was deleted.

0 commit comments

Comments
 (0)