We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 159ba8a commit b7cb77fCopy full SHA for b7cb77f
compiler/rustc_middle/src/ty/assoc.rs
@@ -37,6 +37,11 @@ impl AssocItem {
37
Ident::new(self.name, tcx.def_ident_span(self.def_id).unwrap())
38
}
39
40
+ /// Gets the defaultness of the associated item.
41
+ /// To get the default associated type, use the [`type_of`] query on the
42
+ /// [`DefId`] of the type.
43
+ ///
44
+ /// [`type_of`]: crate::ty::TyCtxt::type_of
45
pub fn defaultness(&self, tcx: TyCtxt<'_>) -> hir::Defaultness {
46
tcx.impl_defaultness(self.def_id)
47
0 commit comments