From bc11475a2a0f06d5083a7032764a50e5f8ade130 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 14 Oct 2020 21:40:51 +0200 Subject: Properly qualify trait methods in qualify_path assist --- crates/assists/src/tests/generated.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'crates/assists/src/tests') diff --git a/crates/assists/src/tests/generated.rs b/crates/assists/src/tests/generated.rs index 41f536574..7d5618263 100644 --- a/crates/assists/src/tests/generated.rs +++ b/crates/assists/src/tests/generated.rs @@ -712,6 +712,25 @@ fn handle(action: Action) { ) } +#[test] +fn doctest_qualify_path() { + check_doc_test( + "qualify_path", + r#####" +fn main() { + let map = HashMap<|>::new(); +} +pub mod std { pub mod collections { pub struct HashMap { } } } +"#####, + r#####" +fn main() { + let map = std::collections::HashMap::new(); +} +pub mod std { pub mod collections { pub struct HashMap { } } } +"#####, + ) +} + #[test] fn doctest_remove_dbg() { check_doc_test( -- cgit v1.2.3