/src/test/auxiliary/cross_crate_spans.rs

https://gitlab.com/pranith/rust · Rust · 26 lines · 11 code · 4 blank · 11 comment · 0 complexity · 2887dd4595edc3603d9bcd809d1b5821 MD5 · raw file

  1. // Copyright 2013-2015 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. #![crate_type = "rlib"]
  11. #![omit_gdb_pretty_printer_section]
  12. // no-prefer-dynamic
  13. // compile-flags:-g
  14. pub fn generic_function<T: Clone>(val: T) -> (T, T) {
  15. let result = (val.clone(), val.clone());
  16. let a_variable: u32 = 123456789;
  17. let another_variable: f64 = 123456789.5;
  18. zzz();
  19. result
  20. }
  21. #[inline(never)]
  22. fn zzz() {()}