From 35130d7233e939cc9a6fd8b72a4baee2eb59c3b2 Mon Sep 17 00:00:00 2001 From: r0cky Date: Wed, 5 Jun 2024 23:20:09 +0800 Subject: Detect pub structs never constructed and unused associated constants in traits --- tests/ui/const-generics/generic_const_exprs/associated-consts.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/ui/const-generics/generic_const_exprs') 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(#[allow(dead_code)] C); +#[allow(dead_code)] +pub struct Block(C); pub fn test() where -- cgit 1.4.1-3-g733a5