about summary refs log tree commit diff
path: root/src/test/debuginfo
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2016-04-26 10:51:14 -0700
committerNiko Matsakis <niko@alum.mit.edu>2016-05-06 16:24:48 -0400
commitfbc082dcc65d5bb37a4af09b731b01e860b8c5bf (patch)
tree0ba4a400b7d8863f55a892ee6deeaa7733d7ac18 /src/test/debuginfo
parent77ae7591a88a87f901cfd1e6a8a9e77a944a49b4 (diff)
downloadrust-fbc082dcc65d5bb37a4af09b731b01e860b8c5bf.tar.gz
rust-fbc082dcc65d5bb37a4af09b731b01e860b8c5bf.zip
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.
Diffstat (limited to 'src/test/debuginfo')
-rw-r--r--src/test/debuginfo/aux/cross_crate_debuginfo_type_uniquing.rs26
-rw-r--r--src/test/debuginfo/aux/cross_crate_spans.rs29
-rw-r--r--src/test/debuginfo/aux/issue13213aux.rs29
3 files changed, 84 insertions, 0 deletions
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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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<T: Clone>(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 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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 };