Skip to content

Commit 5f7986b

Browse files
committed
---
yaml --- r: 54565 b: refs/heads/snap-stage3 c: e9a52f5 h: refs/heads/master i: 54563: 97d662a v: v3
1 parent dfa0fd2 commit 5f7986b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 04b2c26f39782ba30ad8868f971d5d8a606fcf88
4+
refs/heads/snap-stage3: e9a52f5af576ffd517284813858b6d06910460ea
55
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/front/intrinsic.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ pub mod intrinsic {
2828
// Remaining fields not listed
2929
}
3030

31-
// FIXME: make this a 0-variant enum; trans/reflect.rs has to match it.
32-
pub type Opaque = ();
31+
pub enum Opaque { }
3332

3433
pub trait TyVisitor {
3534
fn visit_bot(&self) -> bool;

branches/snap-stage3/src/librustc/middle/trans/reflect.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,15 @@ pub impl Reflector {
274274
let repr = adt::represent_type(bcx.ccx(), t);
275275
let variants = ty::substd_enum_variants(ccx.tcx, did, substs);
276276
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 });
277280

278281
let make_get_disr = || {
279282
let sub_path = bcx.fcx.path + ~[path_name(special_idents::anon)];
280283
let sym = mangle_internal_name_by_path_and_seq(ccx, sub_path, ~"get_disr");
281284
let args = [ty::arg { mode: ast::expl(ast::by_copy),
282-
ty: ty::mk_nil_ptr(ccx.tcx) }];
285+
ty: opaqueptrty }];
283286
let llfty = type_of_fn(ccx, args, ty::mk_int(ccx.tcx));
284287
let llfdecl = decl_internal_cdecl_fn(ccx.llmod, sym, llfty);
285288
let arg = unsafe {

0 commit comments

Comments
 (0)