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

https://gitlab.com/pranith/rust · Rust · 38 lines · 17 code · 8 blank · 13 comment · 2 complexity · 3ba01376dd14aa34f86ae04c502e2e87 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. #![feature(core)]
  16. use std::marker::MarkerTrait;
  17. macro_rules! three {
  18. () => { 3 }
  19. }
  20. pub trait U : MarkerTrait {}
  21. pub trait V : MarkerTrait {}
  22. impl U for () {}
  23. impl V for () {}
  24. static A_CONSTANT : isize = 2;
  25. pub fn foo<T:U>(_: isize) -> isize {
  26. 3
  27. }
  28. pub fn an_unused_name() -> isize {
  29. 4
  30. }