imalsogreg commented on a change in pull request #6741: URL: https://github.com/apache/incubator-tvm/pull/6741#discussion_r512007489
########## File path: rust/tvm-macros/src/object.rs ########## @@ -185,5 +187,26 @@ pub fn macro_impl(input: proc_macro::TokenStream) -> TokenStream { expanded.extend(base_tokens); + if derive { + let derives = quote! { + impl std::hash::Hash for #ref_id { + fn hash<H: std::hash::Hasher>(&self, state: &mut H) { + self.0.hash(state) Review comment: Possibly dumb comment (I'm not familiar with this macro) - is `self.0` always the right thing to hash? Or is `#ref_id` sometimes a tuple with multiple fields, where field `.1` and `.2` etc. may be part of what distinguishes objects when hashing? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org