File tree Expand file tree Collapse file tree 1 file changed +6
-17
lines changed
src/librustc/middle/trans Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -278,23 +278,12 @@ impl Type {
278278
279279 pub fn opaque_trait ( ctx : & CrateContext , store : ty:: TraitStore ) -> Type {
280280 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 )
298287 }
299288
300289 pub fn kind ( & self ) -> TypeKind {
You can’t perform that action at this time.
0 commit comments