File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
compiler/rustc_middle/src/ty Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ pub enum GenericArgKind<'tcx> {
48
48
}
49
49
50
50
impl < ' tcx > GenericArgKind < ' tcx > {
51
+ #[ inline]
51
52
fn pack ( self ) -> GenericArg < ' tcx > {
52
53
let ( tag, ptr) = match self {
53
54
GenericArgKind :: Lifetime ( lt) => {
@@ -94,18 +95,21 @@ impl<'tcx> PartialOrd for GenericArg<'tcx> {
94
95
}
95
96
96
97
impl < ' tcx > From < ty:: Region < ' tcx > > for GenericArg < ' tcx > {
98
+ #[ inline]
97
99
fn from ( r : ty:: Region < ' tcx > ) -> GenericArg < ' tcx > {
98
100
GenericArgKind :: Lifetime ( r) . pack ( )
99
101
}
100
102
}
101
103
102
104
impl < ' tcx > From < Ty < ' tcx > > for GenericArg < ' tcx > {
105
+ #[ inline]
103
106
fn from ( ty : Ty < ' tcx > ) -> GenericArg < ' tcx > {
104
107
GenericArgKind :: Type ( ty) . pack ( )
105
108
}
106
109
}
107
110
108
111
impl < ' tcx > From < ty:: Const < ' tcx > > for GenericArg < ' tcx > {
112
+ #[ inline]
109
113
fn from ( c : ty:: Const < ' tcx > ) -> GenericArg < ' tcx > {
110
114
GenericArgKind :: Const ( c) . pack ( )
111
115
}
You can’t perform that action at this time.
0 commit comments