File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
branches/try/src/librustc Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
5
- refs/heads/try: 04b2c26f39782ba30ad8868f971d5d8a606fcf88
5
+ refs/heads/try: e9a52f5af576ffd517284813858b6d06910460ea
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 @@ -28,8 +28,7 @@ pub mod intrinsic {
28
28
// Remaining fields not listed
29
29
}
30
30
31
- // FIXME: make this a 0-variant enum; trans/reflect.rs has to match it.
32
- pub type Opaque = ( ) ;
31
+ pub enum Opaque { }
33
32
34
33
pub trait TyVisitor {
35
34
fn visit_bot ( & self ) -> bool ;
Original file line number Diff line number Diff line change @@ -274,12 +274,15 @@ pub impl Reflector {
274
274
let repr = adt:: represent_type ( bcx. ccx ( ) , t) ;
275
275
let variants = ty:: substd_enum_variants ( ccx. tcx , did, substs) ;
276
276
let llptrty = T_ptr ( type_of ( ccx, t) ) ;
277
+ let ( _, opaquety) = * ( ccx. tcx . intrinsic_defs . find ( & ccx. sess . ident_of ( ~"Opaque ") )
278
+ . expect ( "Failed to resolve intrinsic::Opaque" ) ) ;
279
+ let opaqueptrty = ty:: mk_ptr ( ccx. tcx , ty:: mt { ty : opaquety, mutbl : ast:: m_imm } ) ;
277
280
278
281
let make_get_disr = || {
279
282
let sub_path = bcx. fcx . path + ~[ path_name ( special_idents:: anon) ] ;
280
283
let sym = mangle_internal_name_by_path_and_seq ( ccx, sub_path, ~"get_disr") ;
281
284
let args = [ ty:: arg { mode : ast:: expl ( ast:: by_copy) ,
282
- ty : ty :: mk_nil_ptr ( ccx . tcx ) } ] ;
285
+ ty : opaqueptrty } ] ;
283
286
let llfty = type_of_fn ( ccx, args, ty:: mk_int ( ccx. tcx ) ) ;
284
287
let llfdecl = decl_internal_cdecl_fn ( ccx. llmod , sym, llfty) ;
285
288
let arg = unsafe {
You can’t perform that action at this time.
0 commit comments