/src/test/auxiliary/svh-b.rs

https://gitlab.com/pranith/rust · Rust · 23 lines · 3 code · 4 blank · 16 comment · 0 complexity · 4f5507c2982d87bd151a78858dba9e06 MD5 · raw file

  1. // Copyright 2014 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. //! This is a client of the `a` crate defined in "svn-a-base.rs". The
  11. //! rpass and cfail tests (such as "run-pass/svh-add-comment.rs") use
  12. //! it by swapping in a different object code library crate built from
  13. //! some variant of "svn-a-base.rs", and then we are checking if the
  14. //! compiler properly ignores or accepts the change, based on whether
  15. //! the change could affect the downstream crate content or not
  16. //! (#14132).
  17. #![crate_name = "b"]
  18. extern crate a;
  19. pub fn foo() { assert_eq!(a::foo::<()>(0), 3); }