We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91df75d commit afe3410Copy full SHA for afe3410
1 file changed
libcc2rs-macros/src/state_machine.rs
@@ -61,6 +61,7 @@ impl GotoStateMachine {
61
};
62
quote! {
63
#idx => {
64
+ #[allow(unreachable_code)]
65
{ #body; #tail }
66
}
67
@@ -77,6 +78,7 @@ impl GotoStateMachine {
77
78
(
79
quote! { let mut #flag: bool = false; },
80
81
82
if #flag { #stmt }
83
},
84
)
@@ -116,6 +118,7 @@ impl StateMachine for GotoStateMachine {
116
118
#brk_decl
117
119
#cnt_decl
120
let mut #s: u32 = 0;
121
+ #[allow(unreachable_code, unused_labels)]
122
#lbl: loop {
123
match #s {
124
#(#body_arms)*
@@ -167,6 +170,7 @@ impl SwitchStateMachine {
167
170
});
168
171
let body: Expr = syn::parse_quote! {
169
172
{
173
+ #[allow(unreachable_patterns)]
174
match #cond {
175
#(#case_arms,)*
176
_ => break #label,
0 commit comments