From 15a7ed2e95f2c4dfd3a52f34958d253e2f2648c4 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 9 Jul 2024 19:46:33 +0200 Subject: [PATCH] added error tip --- crates/compiler/mono/src/borrow.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/compiler/mono/src/borrow.rs b/crates/compiler/mono/src/borrow.rs index 865c912300..ba01224942 100644 --- a/crates/compiler/mono/src/borrow.rs +++ b/crates/compiler/mono/src/borrow.rs @@ -393,7 +393,11 @@ impl<'state, 'a> State<'state, 'a> { let borrow_signature = match borrow_signatures.procs.get(&(name.name(), proc_layout)) { Some(s) => s, - None => unreachable!("no borrow signature for {name:?} layout"), + None => unreachable!( + "\n\tNo borrow signature for {name:?} layout.\n\n\t\ + Tip: This can happen when you call a function with less arguments than it expects.\n\t\ + Like `Arg.list!` instead of `Arg.list! {{}}`" + ) }; for (argument, ownership) in arguments.iter().zip(borrow_signature.iter()) {