6c8e2df45cd09a5b123a3f62cf5c297bc58febfb
Refactor the `updated_metrics` function to `refreshed_metrics`. This function now clones the `NodeMetrics` if the new type is identical to the original, avoiding unnecessary allocations. Also, adjust the `Block` and `Lambda` node kinds to correctly propagate concrete types after inlining, especially when dealing with polymorphic functions. This ensures that the return types of blocks and lambdas reflect the actual computed types rather than stale type variables. This change improves type inference accuracy and prepares for more advanced optimizations by ensuring type information is correctly propagated through the AST.
Description
No description provided
Languages
Rust
100%