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> {
4848}
4949
5050impl < ' tcx > GenericArgKind < ' tcx > {
51+ #[ inline]
5152 fn pack ( self ) -> GenericArg < ' tcx > {
5253 let ( tag, ptr) = match self {
5354 GenericArgKind :: Lifetime ( lt) => {
@@ -94,18 +95,21 @@ impl<'tcx> PartialOrd for GenericArg<'tcx> {
9495}
9596
9697impl < ' tcx > From < ty:: Region < ' tcx > > for GenericArg < ' tcx > {
98+ #[ inline]
9799 fn from ( r : ty:: Region < ' tcx > ) -> GenericArg < ' tcx > {
98100 GenericArgKind :: Lifetime ( r) . pack ( )
99101 }
100102}
101103
102104impl < ' tcx > From < Ty < ' tcx > > for GenericArg < ' tcx > {
105+ #[ inline]
103106 fn from ( ty : Ty < ' tcx > ) -> GenericArg < ' tcx > {
104107 GenericArgKind :: Type ( ty) . pack ( )
105108 }
106109}
107110
108111impl < ' tcx > From < ty:: Const < ' tcx > > for GenericArg < ' tcx > {
112+ #[ inline]
109113 fn from ( c : ty:: Const < ' tcx > ) -> GenericArg < ' tcx > {
110114 GenericArgKind :: Const ( c) . pack ( )
111115 }
You can’t perform that action at this time.
0 commit comments