]> git.lizzy.rs Git - rust.git/blobdiff - crates/ide_completion/src/completions.rs
Merge #11393
[rust.git] / crates / ide_completion / src / completions.rs
index 974264c319bd65cfbc6fb3ef92fedf7e1f0609a1..a072d223e0daf610cbcfe33f27342d5bfaeeaaa9 100644 (file)
@@ -14,6 +14,7 @@
 pub(crate) mod snippet;
 pub(crate) mod trait_impl;
 pub(crate) mod unqualified_path;
+pub(crate) mod format_string;
 
 use std::iter;
 
@@ -90,7 +91,7 @@ pub(crate) fn add_resolution(
             cov_mark::hit!(qualified_path_doc_hidden);
             return;
         }
-        self.add_opt(render_resolution(RenderContext::new(ctx), local_name, resolution));
+        self.add(render_resolution(RenderContext::new(ctx), local_name, resolution));
     }
 
     pub(crate) fn add_macro(
@@ -103,7 +104,7 @@ pub(crate) fn add_macro(
             Some(it) => it,
             None => return,
         };
-        self.add_opt(render_macro(RenderContext::new(ctx), None, name, macro_));
+        self.add(render_macro(RenderContext::new(ctx), None, name, macro_));
     }
 
     pub(crate) fn add_function(
@@ -252,7 +253,7 @@ fn enum_variants_with_paths(
 ) {
     let variants = enum_.variants(ctx.db);
 
-    let module = if let Some(module) = ctx.scope.module() {
+    let module = if let Some(module) = ctx.module {
         // Compute path from the completion site if available.
         module
     } else {