/src/test/run-pass/auxiliary/svh-a-base.rs

https://gitlab.com/alx741/rust · Rust · 35 lines · 15 code · 7 blank · 13 comment · 2 complexity · 21e65c6460ad47c7fccd82c1c7bcb888 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. //! The `svh-a-*.rs` files are all deviations from the base file
  11. //! svh-a-base.rs with some difference (usually in `fn foo`) that
  12. //! should not affect the strict version hash (SVH) computation
  13. //! (#14132).
  14. #![crate_name = "a"]
  15. macro_rules! three {
  16. () => { 3 }
  17. }
  18. pub trait U {}
  19. pub trait V {}
  20. impl U for () {}
  21. impl V for () {}
  22. static A_CONSTANT : isize = 2;
  23. pub fn foo<T:U>(_: isize) -> isize {
  24. 3
  25. }
  26. pub fn an_unused_name() -> isize {
  27. 4
  28. }