File tree Expand file tree Collapse file tree 5 files changed +641
-662
lines changed Expand file tree Collapse file tree 5 files changed +641
-662
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: a34b8dec697014f15e725215e17ea8d956c0ab1a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: d44ea720fa9dfe062ef06d0eb49a58d4e7e92344
5
- refs/heads/try: 1562d8cbd890d39640d98afa59424cc8002ea85a
5
+ refs/heads/try: dad2db7c83de71063b9311eb3e41bdf4027616f6
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 6601b0501e31d08d3892a2d5a7d8a57ab120bf75
Original file line number Diff line number Diff line change @@ -120,6 +120,13 @@ impl ImplOrTraitItem {
120
120
TypeTraitItem ( ref associated_type) => associated_type. container ,
121
121
}
122
122
}
123
+
124
+ pub fn as_opt_method ( & self ) -> Option < Rc < Method > > {
125
+ match * self {
126
+ MethodTraitItem ( ref m) => Some ( ( * m) . clone ( ) ) ,
127
+ TypeTraitItem ( _) => None
128
+ }
129
+ }
123
130
}
124
131
125
132
#[ deriving( Clone ) ]
@@ -1240,6 +1247,10 @@ impl Generics {
1240
1247
}
1241
1248
1242
1249
impl TraitRef {
1250
+ pub fn new ( def_id : ast:: DefId , substs : Substs ) -> TraitRef {
1251
+ TraitRef { def_id : def_id, substs : substs }
1252
+ }
1253
+
1243
1254
pub fn self_ty ( & self ) -> ty:: t {
1244
1255
self . substs . self_ty ( ) . unwrap ( )
1245
1256
}
You can’t perform that action at this time.
0 commit comments