Skip to content

Commit 6697800

Browse files
committed
---
yaml --- r: 383 b: refs/heads/master c: f282c5c h: refs/heads/master i: 381: 7e0bc73 379: db71a96 375: 34bf788 367: a1bd656 351: f01db02 319: 9654e24 255: 37303de v: v3
1 parent f2fc2be commit 6697800

File tree

4 files changed

+35
-6
lines changed

4 files changed

+35
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: a9ad2e98e3995eac620add75d9e93d1625dcf9ef
2+
refs/heads/master: f282c5ccc001ba377dfeee6f347ef56b73c86f4e

trunk/src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ TEST_XFAILS_LLVM := $(addprefix test/run-pass/, \
415415
generic-obj.rs \
416416
generic-recursive-tag.rs \
417417
generic-tag-alt.rs \
418+
generic-tag-values.rs \
418419
generic-tag.rs \
419420
i32-sub.rs \
420421
i8-incr.rs \

trunk/src/boot/me/trans.ml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3082,8 +3082,11 @@ let trans_visitor
30823082
let sub_dst_cell = get_element_ptr_dyn ty_params dst i in
30833083
let sub_src_cell = get_element_ptr_dyn ty_params src i in
30843084
trans_copy_ty
3085-
ty_params initializing
3086-
sub_dst_cell ty sub_src_cell ty None
3085+
ty_params
3086+
initializing
3087+
sub_dst_cell ty
3088+
sub_src_cell ty
3089+
None
30873090
end
30883091
tys
30893092

@@ -5064,10 +5067,12 @@ let trans_visitor
50645067
Array.iteri
50655068
begin
50665069
fun i sloti ->
5067-
let slot = sloti.node in
5070+
let slot = get_slot cx sloti.id in
50685071
let ty = slot_ty slot in
5069-
trans_copy_ty ty_params true
5070-
(get_element_ptr_dyn_in_current_frame tag_body_cell i) ty
5072+
trans_copy_ty
5073+
ty_params
5074+
true
5075+
(get_element_ptr_dyn ty_params tag_body_cell i) ty
50715076
(deref_slot false (cell_of_block_slot sloti.id) slot) ty
50725077
None;
50735078
end
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// -*- rust -*-
2+
3+
type noption[T] = tag(some(T));
4+
5+
fn main() {
6+
let noption[int] nop = some[int](5);
7+
alt (nop) {
8+
case (some[int](n)) {
9+
log n;
10+
check (n == 5);
11+
}
12+
}
13+
14+
let noption[tup(int, int)] nop2 = some[tup(int, int)](tup(17, 42));
15+
alt (nop2) {
16+
case (some[tup(int, int)](t)) {
17+
log t._0;
18+
log t._1;
19+
check (t._0 == 17);
20+
check (t._1 == 42);
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)