From a34ebcd488e477ec8022c437509c7680202a31fc Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Wed, 6 Nov 2024 14:56:31 +0100 Subject: [PATCH] fix: stop dead branch in proc macro from emitting clippy::missing_panics_doc --- sqlx-macros-core/src/query/args.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sqlx-macros-core/src/query/args.rs b/sqlx-macros-core/src/query/args.rs index 0eadd4dc9b..01611fbb4e 100644 --- a/sqlx-macros-core/src/query/args.rs +++ b/sqlx-macros-core/src/query/args.rs @@ -89,7 +89,9 @@ pub fn quote_args( _ty_check = match_borrow.match_borrow(); // this causes move-analysis to effectively ignore this block - ::std::panic!(); + // `panic!` would be enough here but we would then get a warning on `clippy::missing_panics_doc` + // SAFETY: this branch is never reached. + unsafe { ::std::hint::unreachable_unchecked() } } )) })