Skip to content

Commit afe3410

Browse files
committed
Revert "Delete unreachable/unused attributes"
This reverts commit 67c099f.
1 parent 91df75d commit afe3410

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

libcc2rs-macros/src/state_machine.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ impl GotoStateMachine {
6161
};
6262
quote! {
6363
#idx => {
64+
#[allow(unreachable_code)]
6465
{ #body; #tail }
6566
}
6667
}
@@ -77,6 +78,7 @@ impl GotoStateMachine {
7778
(
7879
quote! { let mut #flag: bool = false; },
7980
quote! {
81+
#[allow(unreachable_code)]
8082
if #flag { #stmt }
8183
},
8284
)
@@ -116,6 +118,7 @@ impl StateMachine for GotoStateMachine {
116118
#brk_decl
117119
#cnt_decl
118120
let mut #s: u32 = 0;
121+
#[allow(unreachable_code, unused_labels)]
119122
#lbl: loop {
120123
match #s {
121124
#(#body_arms)*
@@ -167,6 +170,7 @@ impl SwitchStateMachine {
167170
});
168171
let body: Expr = syn::parse_quote! {
169172
{
173+
#[allow(unreachable_patterns)]
170174
match #cond {
171175
#(#case_arms,)*
172176
_ => break #label,

0 commit comments

Comments
 (0)