about summary refs log tree commit diff
path: root/src/test/ui/dropck
diff options
context:
space:
mode:
authorCaio <c410.f3r@gmail.com>2022-11-05 09:58:13 -0300
committerCaio <c410.f3r@gmail.com>2022-11-05 09:58:13 -0300
commitc72c646625504fa1e772b1265d88e70cc5ba340b (patch)
tree328a651b8dd254f66265d0ff70de33cb201d56f4 /src/test/ui/dropck
parent452cf4f7109f58433ac38be7d3da527408571054 (diff)
downloadrust-c72c646625504fa1e772b1265d88e70cc5ba340b.tar.gz
rust-c72c646625504fa1e772b1265d88e70cc5ba340b.zip
Move some tests to more reasonable directories
Diffstat (limited to 'src/test/ui/dropck')
-rw-r--r--src/test/ui/dropck/issue-54943-1.rs13
-rw-r--r--src/test/ui/dropck/issue-54943-2.rs16
2 files changed, 29 insertions, 0 deletions
diff --git a/src/test/ui/dropck/issue-54943-1.rs b/src/test/ui/dropck/issue-54943-1.rs
new file mode 100644
index 00000000000..ec682d96081
--- /dev/null
+++ b/src/test/ui/dropck/issue-54943-1.rs
@@ -0,0 +1,13 @@
+// This test is a minimal version of an ICE in the dropck-eyepatch tests
+// found in the fix for #54943.
+
+// check-pass
+
+fn foo<T>(_t: T) {
+}
+
+fn main() {
+    struct A<'a, B: 'a>(&'a B);
+    let (a1, a2): (String, A<_>) = (String::from("auto"), A(&"this"));
+    foo((a1, a2));
+}
diff --git a/src/test/ui/dropck/issue-54943-2.rs b/src/test/ui/dropck/issue-54943-2.rs
new file mode 100644
index 00000000000..d400ae58db4
--- /dev/null
+++ b/src/test/ui/dropck/issue-54943-2.rs
@@ -0,0 +1,16 @@
+// This test is a minimal version of an ICE in the dropck-eyepatch tests
+// found in the fix for #54943. In particular, this test is in unreachable
+// code as the initial fix for this ICE only worked if the code was reachable.
+
+// check-pass
+
+fn foo<T>(_t: T) {
+}
+
+fn main() {
+    return;
+
+    struct A<'a, B: 'a>(&'a B);
+    let (a1, a2): (String, A<_>) = (String::from("auto"), A(&"this"));
+    foo((a1, a2));
+}