about summary refs log tree commit diff
path: root/tests/ui/codegen
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/codegen
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/codegen')
-rw-r--r--tests/ui/codegen/static-array-comparison-7012.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/codegen/static-array-comparison-7012.rs b/tests/ui/codegen/static-array-comparison-7012.rs
new file mode 100644
index 00000000000..c08b1c0059b
--- /dev/null
+++ b/tests/ui/codegen/static-array-comparison-7012.rs
@@ -0,0 +1,23 @@
+// https://github.com/rust-lang/rust/issues/7012
+//@ run-pass
+#![allow(non_camel_case_types)]
+#![allow(non_upper_case_globals)]
+
+/*
+# Comparison of static arrays
+
+The expected behaviour would be that `test == test1`, therefore 'true'
+would be printed, however the below prints false.
+*/
+
+struct signature<'a> { pattern : &'a [u32] }
+
+static test1: signature<'static> =  signature {
+  pattern: &[0x243f6a88,0x85a308d3,0x13198a2e,0x03707344,0xa4093822,0x299f31d0]
+};
+
+pub fn main() {
+  let test: &[u32] = &[0x243f6a88,0x85a308d3,0x13198a2e,
+                       0x03707344,0xa4093822,0x299f31d0];
+  println!("{}",test==test1.pattern);
+}