Skip to content

Commit 442ab98

Browse files
committed
Apply diagnostic attribute
1 parent 58c88ee commit 442ab98

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎splat-overload/src/lib.rs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ fn generate_free_functions(functions: Vec<ItemFn>) -> TokenStream {
185185
}
186186

187187
let generated = quote! {
188+
#[diagnostic::on_unimplemented(
189+
message = "Missing overload for arguments `{Self}`",
190+
label = "these arguments do not match any overload",
191+
note = "Check for extra or missing arguments, and argument types",
192+
note = "Consider adding a new overload in the overload!{{ ... }} block",
193+
)]
188194
trait #trait_name: std::marker::Tuple {
189195
type Output;
190196
fn call(self) -> Self::Output;

0 commit comments

Comments
 (0)