We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b56aaec commit 06e53afCopy full SHA for 06e53af
compiler/rustc_middle/src/ty/mod.rs
@@ -1994,7 +1994,7 @@ impl<'tcx> TyCtxt<'tcx> {
1994
pub fn trait_of_item(self, def_id: DefId) -> Option<DefId> {
1995
if let DefKind::AssocConst | DefKind::AssocFn | DefKind::AssocTy = self.def_kind(def_id) {
1996
let parent = self.parent(def_id);
1997
- if let DefKind::Trait | DefKind::TraitAlias = self.def_kind(parent) {
+ if let DefKind::Trait = self.def_kind(parent) {
1998
return Some(parent);
1999
}
2000
0 commit comments