Default methods of traits are also AssocFn defs as they essentially desugar to a method in a new impl block

This commit is contained in:
Oli Scherer 2022-05-12 07:43:41 +00:00
parent ecaf7b7cee
commit 0e3d8d2b13

View File

@ -92,6 +92,7 @@ pub enum DefKind {
/// [RFC 2593]: https://github.com/rust-lang/rfcs/pull/2593
Ctor(CtorOf, CtorKind),
/// Associated function: `impl MyStruct { fn associated() {} }`
/// or `trait Foo { fn associated() {} }`
AssocFn,
/// Associated constant: `trait MyTrait { const ASSOC: usize; }`
AssocConst,