PageRenderTime 2ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/compile-fail/export-fully-qualified.rs

http://github.com/jruderman/rust
Rust | 16 lines | 6 code | 6 blank | 4 comment | 0 complexity | d36ee997d94828077fa0585a88eb14d4 MD5 | raw file
 1// error-pattern: unresolved name
 2
 3// In this test baz isn't resolved when called as foo.baz even though
 4// it's called from inside foo. This is somewhat surprising and may
 5// want to change eventually.
 6
 7mod foo {
 8
 9    export bar;
10
11    fn bar() { foo::baz(); }
12
13    fn baz() { }
14}
15
16fn main() { }