added error tip

This commit is contained in:
Anton-4 2024-07-09 19:46:33 +02:00
parent 0d9db5bf2d
commit 15a7ed2e95
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937

View file

@ -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()) {