File tree Expand file tree Collapse file tree 2 files changed +7
-18
lines changed
branches/try/src/librustc/middle/trans Expand file tree Collapse file tree 2 files changed +7
-18
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 0e4d1fc8cae42e15e00f71d9f439b01bb25a86ae
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5
- refs/heads/try: 2927ab13df9436ae2042866885ea0b9d29cdcedc
5
+ refs/heads/try: dfa3f5fa8d20bc970843c88bc5cbca398a26ce7c
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -278,23 +278,12 @@ impl Type {
278
278
279
279
pub fn opaque_trait ( ctx : & CrateContext , store : ty:: TraitStore ) -> Type {
280
280
let tydesc_ptr = ctx. tydesc_type . ptr_to ( ) ;
281
- match store {
282
- ty:: BoxTraitStore => {
283
- Type :: struct_ (
284
- [ tydesc_ptr, Type :: opaque_box ( ctx) . ptr_to ( ) ] ,
285
- false )
286
- }
287
- ty:: UniqTraitStore => {
288
- Type :: struct_ (
289
- [ tydesc_ptr, Type :: unique ( ctx, & Type :: i8 ( ) ) . ptr_to ( ) ] ,
290
- false )
291
- }
292
- ty:: RegionTraitStore ( * ) => {
293
- Type :: struct_ (
294
- [ tydesc_ptr, Type :: i8 ( ) . ptr_to ( ) ] ,
295
- false )
296
- }
297
- }
281
+ let box_ty = match store {
282
+ ty:: BoxTraitStore => Type :: opaque_box ( ctx) ,
283
+ ty:: UniqTraitStore => Type :: unique ( ctx, & Type :: i8 ( ) ) ,
284
+ ty:: RegionTraitStore ( * ) => Type :: i8 ( )
285
+ } ;
286
+ Type :: struct_ ( [ tydesc_ptr, box_ty. ptr_to ( ) ] , false )
298
287
}
299
288
300
289
pub fn kind ( & self ) -> TypeKind {
You can’t perform that action at this time.
0 commit comments