Skip to content

Commit 36465fc

Browse files
committed
---
yaml --- r: 2308 b: refs/heads/master c: 764de07 h: refs/heads/master v: v3
1 parent 9d60e70 commit 36465fc

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
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: 9d21cf3b6188133759eab3e588555a9389a38ff5
2+
refs/heads/master: 764de078e7c4baaf0a1f426e7ac4d834c2ea8797
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// This tests that exports can have visible dependencies on things
2+
// that are not exported, allowing for a sort of poor-man's ADT
3+
4+
mod foo {
5+
export f;
6+
export g;
7+
8+
// not exported
9+
tag t {
10+
t1;
11+
}
12+
13+
fn f() -> t {
14+
ret t1;
15+
}
16+
17+
fn g(t v) {
18+
assert v == t1;
19+
}
20+
}
21+
22+
fn main() {
23+
foo.g(foo.f());
24+
}

0 commit comments

Comments
 (0)