Test TraitRef equality before generating missing impl method body

This commit is contained in:
Ryo Yoshida 2023-01-15 02:36:26 +09:00
parent 8afaaa54b0
commit fc56cacfc1
No known key found for this signature in database
GPG key ID: E25698A930586171
3 changed files with 80 additions and 18 deletions

View file

@ -214,7 +214,7 @@ fn impl_def_from_trait(
// Generate a default `impl` function body for the derived trait.
if let ast::AssocItem::Fn(ref func) = first_assoc_item {
let _ = gen_trait_fn_body(func, trait_path, adt);
let _ = gen_trait_fn_body(func, trait_path, adt, None);
};
Some((impl_def, first_assoc_item))