Check for differing attributes in granularity guessing

This commit is contained in:
Lukas Tobias Wirth 2021-05-20 10:25:04 +02:00
parent b4fe479236
commit 2bf720900f
3 changed files with 21 additions and 7 deletions

View file

@ -717,6 +717,18 @@ pub use foo::bar::qux;
);
}
#[test]
fn guess_skips_differing_attrs() {
check_guess(
r"
pub use foo::bar::baz;
#[doc(hidden)]
pub use foo::bar::qux;
",
ImportGranularityGuess::Unknown,
);
}
#[test]
fn guess_grouping_matters() {
check_guess(