diff options
| author | r0cky <mu001999@outlook.com> | 2024-06-05 23:20:09 +0800 |
|---|---|---|
| committer | r0cky <mu001999@outlook.com> | 2024-06-05 23:20:09 +0800 |
| commit | 35130d7233e939cc9a6fd8b72a4baee2eb59c3b2 (patch) | |
| tree | ea13e12817d949301828e9ff4f5775ca8ba9a31e /tests/ui/const-generics/generic_const_exprs | |
| parent | 2a2c29aafa50bf6fe53d66b32070eba59f860ac3 (diff) | |
| download | rust-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.rs | 3 |
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 |
