rust/src/test/run-pass/export-unexported-dep.rs
Marijn Haverbeke 3816e57fd2 Downcase std modules again, move to :: for module dereferencing
This should be a snapshot transition.
2011-05-12 21:30:44 +02:00

24 lines
315 B
Rust

// This tests that exports can have visible dependencies on things
// that are not exported, allowing for a sort of poor-man's ADT
mod foo {
export f;
export g;
// not exported
tag t {
t1;
}
fn f() -> t {
ret t1;
}
fn g(t v) {
assert v == t1;
}
}
fn main() {
foo::g(foo::f());
}