From fbc082dcc65d5bb37a4af09b731b01e860b8c5bf Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 26 Apr 2016 10:51:14 -0700 Subject: move auxiliary builds to a test-relative `aux` Instead of finding aux-build files in `auxiliary`, we now search for an `aux` directory relative to the test. So if your test is `compile-fail/foo.rs`, we would look in `compile-fail/aux`. Similarly, we ignore the `aux` directory when searching for tets. --- .../aux/cross_crate_debuginfo_type_uniquing.rs | 26 +++++++++++++++++++ src/test/debuginfo/aux/cross_crate_spans.rs | 29 ++++++++++++++++++++++ src/test/debuginfo/aux/issue13213aux.rs | 29 ++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 src/test/debuginfo/aux/cross_crate_debuginfo_type_uniquing.rs create mode 100644 src/test/debuginfo/aux/cross_crate_spans.rs create mode 100644 src/test/debuginfo/aux/issue13213aux.rs (limited to 'src/test/debuginfo') diff --git a/src/test/debuginfo/aux/cross_crate_debuginfo_type_uniquing.rs b/src/test/debuginfo/aux/cross_crate_debuginfo_type_uniquing.rs new file mode 100644 index 00000000000..f4bc72305a0 --- /dev/null +++ b/src/test/debuginfo/aux/cross_crate_debuginfo_type_uniquing.rs @@ -0,0 +1,26 @@ +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// no-prefer-dynamic +#![crate_type = "rlib"] +// compile-flags:-g + +struct S1; + +impl S1 { + fn f(&mut self) { } +} + + +struct S2; + +impl S2 { + fn f(&mut self) { } +} diff --git a/src/test/debuginfo/aux/cross_crate_spans.rs b/src/test/debuginfo/aux/cross_crate_spans.rs new file mode 100644 index 00000000000..9b6b6221bda --- /dev/null +++ b/src/test/debuginfo/aux/cross_crate_spans.rs @@ -0,0 +1,29 @@ +// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_type = "rlib"] + +#![allow(unused_variables)] +#![feature(omit_gdb_pretty_printer_section)] +#![omit_gdb_pretty_printer_section] + +// no-prefer-dynamic +// compile-flags:-g + +pub fn generic_function(val: T) -> (T, T) { + let result = (val.clone(), val.clone()); + let a_variable: u32 = 123456789; + let another_variable: f64 = 123456789.5; + zzz(); + result +} + +#[inline(never)] +fn zzz() {()} diff --git a/src/test/debuginfo/aux/issue13213aux.rs b/src/test/debuginfo/aux/issue13213aux.rs new file mode 100644 index 00000000000..d0566a1e091 --- /dev/null +++ b/src/test/debuginfo/aux/issue13213aux.rs @@ -0,0 +1,29 @@ +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_type = "lib"] +// compile-flags:-g + +pub use private::P; + +#[derive(Copy, Clone)] +pub struct S { + p: P, +} + +mod private { + #[derive(Copy, Clone)] + pub struct P { + p: i32, + } + pub const THREE: P = P { p: 3 }; +} + +pub static A: S = S { p: private::THREE }; -- cgit 1.4.1-3-g733a5