diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-05-12 07:43:41 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-05-30 08:52:25 +0000 |
| commit | 0e3d8d2b137227d6cee74c80bf9a47620cd0e365 (patch) | |
| tree | 40fe7fd7e0df71849e5c8081e79a1d29cab5e606 | |
| parent | ecaf7b7ceeef920f9bb771c383920ae77a63e169 (diff) | |
| download | rust-0e3d8d2b137227d6cee74c80bf9a47620cd0e365.tar.gz rust-0e3d8d2b137227d6cee74c80bf9a47620cd0e365.zip | |
Default methods of traits are also AssocFn defs as they essentially desugar to a method in a new impl block
| -rw-r--r-- | compiler/rustc_hir/src/def.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/def.rs b/compiler/rustc_hir/src/def.rs index a639df01a78..68876e89c4b 100644 --- a/compiler/rustc_hir/src/def.rs +++ b/compiler/rustc_hir/src/def.rs @@ -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, |
