/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. // In this test baz isn't resolved when called as foo.baz even though
  3. // it's called from inside foo. This is somewhat surprising and may
  4. // want to change eventually.
  5. mod foo {
  6. export bar;
  7. fn bar() { foo::baz(); }
  8. fn baz() { }
  9. }
  10. fn main() { }