about summary refs log tree commit diff
path: root/tests/ui/const-generics/generic_const_exprs
diff options
context:
space:
mode:
authorr0cky <mu001999@outlook.com>2024-06-05 23:20:09 +0800
committerr0cky <mu001999@outlook.com>2024-06-05 23:20:09 +0800
commit35130d7233e939cc9a6fd8b72a4baee2eb59c3b2 (patch)
treeea13e12817d949301828e9ff4f5775ca8ba9a31e /tests/ui/const-generics/generic_const_exprs
parent2a2c29aafa50bf6fe53d66b32070eba59f860ac3 (diff)
downloadrust-35130d7233e939cc9a6fd8b72a4baee2eb59c3b2.tar.gz
rust-35130d7233e939cc9a6fd8b72a4baee2eb59c3b2.zip
Detect pub structs never constructed and unused associated constants in traits
Diffstat (limited to 'tests/ui/const-generics/generic_const_exprs')
-rw-r--r--tests/ui/const-generics/generic_const_exprs/associated-consts.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/ui/const-generics/generic_const_exprs/associated-consts.rs b/tests/ui/const-generics/generic_const_exprs/associated-consts.rs
index 5d2198f50ad..50a6102c605 100644
--- a/tests/ui/const-generics/generic_const_exprs/associated-consts.rs
+++ b/tests/ui/const-generics/generic_const_exprs/associated-consts.rs
@@ -16,7 +16,8 @@ impl BlockCipher for BarCipher {
     const BLOCK_SIZE: usize = 32;
 }
 
-pub struct Block<C>(#[allow(dead_code)] C);
+#[allow(dead_code)]
+pub struct Block<C>(C);
 
 pub fn test<C: BlockCipher, const M: usize>()
 where