Skip to content

Commit 8b10b09

Browse files
committed
add tests for #3057.
Fixes #3057
1 parent 404dd82 commit 8b10b09

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

tests/ui/similar_names.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#![feature(tool_lints)]
2+
#![warn(clippy::similar_names)]
3+
4+
// false positive (#3057)
5+
// would claim total_reg_src_size and total_size and
6+
// numb_reg_src_checkouts and total_bin_size are similar
7+
#[derive(Debug, Clone)]
8+
pub(crate) struct DirSizes {
9+
pub(crate) total_size: u64, // total size of cargo root dir
10+
pub(crate) numb_bins: u64, // number of binaries found
11+
pub(crate) total_bin_size: u64, // total size of binaries found
12+
pub(crate) total_reg_size: u64, // registry size
13+
pub(crate) total_git_db_size: u64, // size of bare repos and checkouts combined
14+
pub(crate) total_git_repos_bare_size: u64, // git db size
15+
pub(crate) numb_git_repos_bare_repos: u64, // number of cloned repos
16+
pub(crate) numb_git_checkouts: u64, // number of checked out repos
17+
pub(crate) total_git_chk_size: u64, // git checkout size
18+
pub(crate) total_reg_cache_size: u64, // registry cache size
19+
pub(crate) total_reg_src_size: u64, // registry sources size
20+
pub(crate) numb_reg_cache_entries: u64, // number of source archives
21+
pub(crate) numb_reg_src_checkouts: u64, // number of source checkouts
22+
}
23+
24+
fn main() {}

tests/ui/similar_names.stderr

Whitespace-only changes.

0 commit comments

Comments
 (0)