diff options
author | Lukas Tobias Wirth <[email protected]> | 2021-05-20 09:25:04 +0100 |
---|---|---|
committer | Lukas Tobias Wirth <[email protected]> | 2021-05-20 09:25:04 +0100 |
commit | 2bf720900f94e36969af44ff8ac52470faf9af4b (patch) | |
tree | c31115d2c813e1f4a0e3bff9fff09d90b471edde /crates/ide_db/src/helpers/insert_use | |
parent | b4fe479236f592fcbfa1422dda54253b77d8b0e1 (diff) |
Check for differing attributes in granularity guessing
Diffstat (limited to 'crates/ide_db/src/helpers/insert_use')
-rw-r--r-- | crates/ide_db/src/helpers/insert_use/tests.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/ide_db/src/helpers/insert_use/tests.rs b/crates/ide_db/src/helpers/insert_use/tests.rs index f795bbf00..78a2a87b3 100644 --- a/crates/ide_db/src/helpers/insert_use/tests.rs +++ b/crates/ide_db/src/helpers/insert_use/tests.rs | |||
@@ -718,6 +718,18 @@ pub use foo::bar::qux; | |||
718 | } | 718 | } |
719 | 719 | ||
720 | #[test] | 720 | #[test] |
721 | fn guess_skips_differing_attrs() { | ||
722 | check_guess( | ||
723 | r" | ||
724 | pub use foo::bar::baz; | ||
725 | #[doc(hidden)] | ||
726 | pub use foo::bar::qux; | ||
727 | ", | ||
728 | ImportGranularityGuess::Unknown, | ||
729 | ); | ||
730 | } | ||
731 | |||
732 | #[test] | ||
721 | fn guess_grouping_matters() { | 733 | fn guess_grouping_matters() { |
722 | check_guess( | 734 | check_guess( |
723 | r" | 735 | r" |