about summary refs log tree commit diff
path: root/tests/ui/associated-consts
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-08-06 15:55:42 +0200
committerGitHub <noreply@github.com>2025-08-06 15:55:42 +0200
commite89ae47b978f50b6fc1873d65486d661520bdf28 (patch)
treeae387ab4a528a1d83c3816a5da26bc8772bd0723 /tests/ui/associated-consts
parentdc0bae1db725fbba8524f195f74f680995fd549e (diff)
parent7196d8cd661b875401126a81641d2effc40b3d85 (diff)
downloadrust-e89ae47b978f50b6fc1873d65486d661520bdf28.tar.gz
rust-e89ae47b978f50b6fc1873d65486d661520bdf28.zip
Rollup merge of #144552 - Oneirical:uncountable-integer-3, r=jieyouxu
Rehome 33 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`

rust-lang/rust#143902 divided into smaller, easier to review chunks.

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/associated-consts')
-rw-r--r--tests/ui/associated-consts/trait-associated-const-usage-43483.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/associated-consts/trait-associated-const-usage-43483.rs b/tests/ui/associated-consts/trait-associated-const-usage-43483.rs
new file mode 100644
index 00000000000..c24157d45e7
--- /dev/null
+++ b/tests/ui/associated-consts/trait-associated-const-usage-43483.rs
@@ -0,0 +1,17 @@
+// https://github.com/rust-lang/rust/issues/43483
+//@ check-pass
+#![allow(dead_code)]
+#![allow(unused_variables)]
+trait VecN {
+    const DIM: usize;
+}
+
+trait Mat {
+    type Row: VecN;
+}
+
+fn m<M: Mat>() {
+    let x = M::Row::DIM;
+}
+
+fn main() {}