Skip to content

Commit 0ca7ca0

Browse files
remove commented-out mutable reference validation
1 parent 616dab7 commit 0ca7ca0

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

soroban-sdk-macros/src/syn_ext.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,6 @@ pub fn fn_arg_ident(arg: &FnArg) -> Result<Ident, Error> {
4848
))
4949
}
5050

51-
// TODO: Add a function that validates function parameters.
52-
// // Check if this is a mutable reference and reject it
53-
// if let Type::Reference(TypeReference { mutability: Some(_), .. }) = *pat_type.ty {
54-
// return Err(Error::new(
55-
// pat_type.ty.span(),
56-
// "mutable references (&mut) are not supported in contract function parameters, use immutable references (&) instead",
57-
// ));
58-
// }
59-
6051
/// Modifies a Pat removing any 'mut' on an Ident.
6152
pub fn pat_unwrap_mut(p: Pat) -> Pat {
6253
match p {

0 commit comments

Comments
 (0)