aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src/helpers/insert_use
diff options
context:
space:
mode:
authorLukas Tobias Wirth <[email protected]>2021-05-20 09:25:04 +0100
committerLukas Tobias Wirth <[email protected]>2021-05-20 09:25:04 +0100
commit2bf720900f94e36969af44ff8ac52470faf9af4b (patch)
treec31115d2c813e1f4a0e3bff9fff09d90b471edde /crates/ide_db/src/helpers/insert_use
parentb4fe479236f592fcbfa1422dda54253b77d8b0e1 (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.rs12
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]
721fn guess_skips_differing_attrs() {
722 check_guess(
723 r"
724pub use foo::bar::baz;
725#[doc(hidden)]
726pub use foo::bar::qux;
727",
728 ImportGranularityGuess::Unknown,
729 );
730}
731
732#[test]
721fn guess_grouping_matters() { 733fn guess_grouping_matters() {
722 check_guess( 734 check_guess(
723 r" 735 r"