/src/test/rustdoc/inline_local/glob-extern-no-defaults.rs

https://gitlab.com/jianglu/rust · Rust · 35 lines · 8 code · 6 blank · 21 comment · 0 complexity · fab74bfd9c7c225486b08f0aad997492 MD5 · raw file

  1. // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
  2. // file at the top-level directory of this distribution and at
  3. // http://rust-lang.org/COPYRIGHT.
  4. //
  5. // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
  6. // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
  7. // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
  8. // option. This file may not be copied, modified, or distributed
  9. // except according to those terms.
  10. // compile-flags: --no-defaults
  11. #![crate_name = "foo"]
  12. mod mod1 {
  13. extern {
  14. pub fn public_fn();
  15. fn private_fn();
  16. }
  17. }
  18. pub use mod1::*;
  19. // @has foo/index.html
  20. // @has - "mod1"
  21. // @has - "public_fn"
  22. // @!has - "private_fn"
  23. // @has foo/fn.public_fn.html
  24. // @!has foo/fn.private_fn.html
  25. // @has foo/mod1/index.html
  26. // @has - "public_fn"
  27. // @has - "private_fn"
  28. // @has foo/mod1/fn.public_fn.html
  29. // @has foo/mod1/fn.private_fn.html