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 0c301e9 commit 079e373Copy full SHA for 079e373
compiler/rustc_smir/src/stable_mir/ty.rs
@@ -135,12 +135,6 @@ impl ImplDef {
135
}
136
137
138
-impl GenericDef {
139
- pub fn generics_of(&self) -> Generics {
140
- with(|cx| cx.generics_of(self.0))
141
- }
142
-}
143
-
144
#[derive(Clone, Debug)]
145
pub struct GenericArgs(pub Vec<GenericArgKind>);
146
@@ -463,6 +457,16 @@ pub struct TraitDecl {
463
457
pub deny_explicit_impl: bool,
464
458
465
459
460
+impl TraitDecl {
461
+ pub fn generics_of(&self) -> Generics {
462
+ with(|cx| cx.generics_of(self.def_id.0))
+ }
+
+ pub fn predicates_of(&self) -> GenericPredicates {
466
+ with(|cx| cx.predicates_of(self.def_id.0))
467
468
+}
469
470
pub type ImplTrait = EarlyBinder<TraitRef>;
471
472
0 commit comments