tlopex opened a new pull request, #682:
URL: https://github.com/apache/tvm-ffi/pull/682

   This PR adds Rust `match_any!`, using source-ordered conditional dispatch. 
Each typed pattern is tried in declaration order, a false guard continues to 
the next arm, and a final fallback arm is required. It also supports borrowed 
values and dynamic object hierarchy matching while strengthening the related 
Object, Tensor, allocator, and FFI safety boundaries.
   
   ```rust
   match_any! {
       expr {
           TypedExpr::<TensorType>(tensor)
               if tensor.shape.length() == 2 => {
                   lower_tensor(tensor, func_context)
               },
   
           TypedExpr::<ShapedType>(shaped) => {
               lower_shaped(shaped, func_context)
           },
   
           _ => {
               report_unsupported(func_context)
           },
       }
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to