summaryrefslogtreecommitdiffstats
path: root/tests/ui/proc-macro/issue-75930-derive-cfg.stdout
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/proc-macro/issue-75930-derive-cfg.stdout65
1 files changed, 63 insertions, 2 deletions
diff --git a/tests/ui/proc-macro/issue-75930-derive-cfg.stdout b/tests/ui/proc-macro/issue-75930-derive-cfg.stdout
index 31a1c44b6..47f26451d 100644
--- a/tests/ui/proc-macro/issue-75930-derive-cfg.stdout
+++ b/tests/ui/proc-macro/issue-75930-derive-cfg.stdout
@@ -1,5 +1,53 @@
PRINT-ATTR INPUT (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[derive(Print)] #[print_helper(b)]
-struct Foo < #[cfg(FALSE)] A, B >
+struct Foo<#[cfg(FALSE)] A, B>
+{
+ #[cfg(FALSE)] first: String, #[cfg_attr(FALSE, deny(warnings))] second:
+ bool, third:
+ [u8;
+ {
+ #[cfg(FALSE)] struct Bar; #[cfg(not(FALSE))] struct Inner;
+ #[cfg(FALSE)] let a = 25; match true
+ {
+ #[cfg(FALSE)] true => {}, #[cfg_attr(not(FALSE), allow(warnings))]
+ false => {}, _ => {}
+ }; #[print_helper(should_be_removed)] fn removed_fn()
+ { #![cfg(FALSE)] } #[print_helper(c)] #[cfg(not(FALSE))] fn kept_fn()
+ { #![cfg(not(FALSE))] let my_val = true; } enum TupleEnum
+ {
+ Foo(#[cfg(FALSE)] u8, #[cfg(FALSE)] bool, #[cfg(not(FALSE))] i32,
+ #[cfg(FALSE)] String, u8)
+ } struct
+ TupleStruct(#[cfg(FALSE)] String, #[cfg(not(FALSE))] i32,
+ #[cfg(FALSE)] bool, u8); fn plain_removed_fn()
+ { #![cfg_attr(not(FALSE), cfg(FALSE))] } 0
+ }], #[print_helper(d)] fourth: B
+}
+PRINT-ATTR RE-COLLECTED (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[derive(Print)] #[print_helper(b)]
+struct Foo <#[cfg(FALSE)] A, B >
+{
+ #[cfg(FALSE)] first: String, #[cfg_attr(FALSE, deny(warnings))] second:
+ bool, third:
+ [u8;
+ {
+ #[cfg(FALSE)] struct Bar; #[cfg(not(FALSE))] struct Inner;
+ #[cfg(FALSE)] let a = 25; match true
+ {
+ #[cfg(FALSE)] true => {}, #[cfg_attr(not(FALSE), allow(warnings))]
+ false => {}, _ => {}
+ }; #[print_helper(should_be_removed)] fn removed_fn()
+ { #![cfg(FALSE)] } #[print_helper(c)] #[cfg(not(FALSE))] fn kept_fn()
+ { #![cfg(not(FALSE))] let my_val = true; } enum TupleEnum
+ {
+ Foo(#[cfg(FALSE)] u8, #[cfg(FALSE)] bool, #[cfg(not(FALSE))] i32,
+ #[cfg(FALSE)] String, u8)
+ } struct
+ TupleStruct(#[cfg(FALSE)] String, #[cfg(not(FALSE))] i32,
+ #[cfg(FALSE)] bool, u8); fn plain_removed_fn()
+ { #![cfg_attr(not(FALSE), cfg(FALSE))] } 0
+ }], #[print_helper(d)] fourth: B
+}
+PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[derive(Print)] #[print_helper(b)]
+struct Foo <#[cfg(FALSE)] A, B >
{
#[cfg(FALSE)] first : String, #[cfg_attr(FALSE, deny(warnings))] second :
bool, third :
@@ -1272,7 +1320,20 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
span: $DIR/issue-75930-derive-cfg.rs:55:32: 102:2 (#0),
},
]
-PRINT-DERIVE INPUT (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[print_helper(b)] struct Foo < B >
+PRINT-DERIVE INPUT (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[print_helper(b)] struct Foo <B >
+{
+ second: bool, third:
+ [u8;
+ {
+ #[cfg(not(FALSE))] struct Inner; match true
+ { #[allow(warnings)] false => {}, _ => {} }; #[print_helper(c)]
+ #[cfg(not(FALSE))] fn kept_fn()
+ { #![cfg(not(FALSE))] let my_val = true; } enum TupleEnum
+ { Foo(#[cfg(not(FALSE))] i32, u8) } struct
+ TupleStruct(#[cfg(not(FALSE))] i32, u8); 0
+ }], #[print_helper(d)] fourth: B
+}
+PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): #[print_helper(a)] #[allow(dead_code)] #[print_helper(b)] struct Foo <B >
{
second : bool, third :
[u8 ;