about summary refs log tree commit diff
path: root/tests/ui/enum/enum-with-generic-parameter-5997.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-08-29 12:37:30 +0200
committerGitHub <noreply@github.com>2025-08-29 12:37:30 +0200
commite15744e7a4095a868cc3d145ae81bd6660247519 (patch)
treef7d75c0c28612e897db38efed084684b0aa4a878 /tests/ui/enum/enum-with-generic-parameter-5997.rs
parent41f2b6b39e7526a28d50ff6918dda6de48add5e4 (diff)
parent2e659f58940a31fa625e88f75f78111ed773f32d (diff)
downloadrust-e15744e7a4095a868cc3d145ae81bd6660247519.tar.gz
rust-e15744e7a4095a868cc3d145ae81bd6660247519.zip
Rollup merge of #145675 - Oneirical:uncountable-integer-8, r=jieyouxu
Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#1 of Batch #2]

Part of rust-lang/rust#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that `@Kivooeo` was using.

r? `@jieyouxu`
Diffstat (limited to 'tests/ui/enum/enum-with-generic-parameter-5997.rs')
-rw-r--r--tests/ui/enum/enum-with-generic-parameter-5997.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/enum/enum-with-generic-parameter-5997.rs b/tests/ui/enum/enum-with-generic-parameter-5997.rs
new file mode 100644
index 00000000000..fab7ebbbbdc
--- /dev/null
+++ b/tests/ui/enum/enum-with-generic-parameter-5997.rs
@@ -0,0 +1,16 @@
+// https://github.com/rust-lang/rust/issues/5997
+//@ run-pass
+#![allow(dead_code)]
+
+fn f<T>() -> bool {
+    enum E<T> { V(T) }
+
+    struct S<T>(T);
+
+    true
+}
+
+fn main() {
+    let b = f::<isize>();
+    assert!(b);
+}