mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-11-03 13:13:18 +00:00 
			
		
		
		
	Make tests pass
This commit is contained in:
		
							parent
							
								
									4322cf7f5b
								
							
						
					
					
						commit
						8fe73a2240
					
				@ -73,10 +73,12 @@ impl ModDir {
 | 
				
			|||||||
                candidate_files.push(self.dir_path.join_attr(attr_path, self.root_non_dir_owner))
 | 
					                candidate_files.push(self.dir_path.join_attr(attr_path, self.root_non_dir_owner))
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            None if file_id.is_include_macro(db.upcast()) => {
 | 
					            None if file_id.is_include_macro(db.upcast()) => {
 | 
				
			||||||
 | 
					                let name = name.unescaped();
 | 
				
			||||||
                candidate_files.push(format!("{}.rs", name));
 | 
					                candidate_files.push(format!("{}.rs", name));
 | 
				
			||||||
                candidate_files.push(format!("{}/mod.rs", name));
 | 
					                candidate_files.push(format!("{}/mod.rs", name));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            None => {
 | 
					            None => {
 | 
				
			||||||
 | 
					                let name = name.unescaped();
 | 
				
			||||||
                candidate_files.push(format!("{}{}.rs", self.dir_path.0, name));
 | 
					                candidate_files.push(format!("{}{}.rs", self.dir_path.0, name));
 | 
				
			||||||
                candidate_files.push(format!("{}{}/mod.rs", self.dir_path.0, name));
 | 
					                candidate_files.push(format!("{}{}/mod.rs", self.dir_path.0, name));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
@ -132,9 +132,9 @@ pub struct Bar;
 | 
				
			|||||||
        expect![[r#"
 | 
					        expect![[r#"
 | 
				
			||||||
            crate
 | 
					            crate
 | 
				
			||||||
            Bar: t v
 | 
					            Bar: t v
 | 
				
			||||||
            async: t
 | 
					            r#async: t
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            crate::async
 | 
					            crate::r#async
 | 
				
			||||||
            Bar: t v
 | 
					            Bar: t v
 | 
				
			||||||
        "#]],
 | 
					        "#]],
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
				
			|||||||
@ -342,7 +342,8 @@ fn render_resolution_simple_(
 | 
				
			|||||||
    let ctx = ctx.import_to_add(import_to_add);
 | 
					    let ctx = ctx.import_to_add(import_to_add);
 | 
				
			||||||
    let kind = res_to_kind(resolution);
 | 
					    let kind = res_to_kind(resolution);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let mut item = CompletionItem::new(kind, ctx.source_range(), local_name.to_smol_str());
 | 
					    let mut item =
 | 
				
			||||||
 | 
					        CompletionItem::new(kind, ctx.source_range(), local_name.unescaped().to_smol_str());
 | 
				
			||||||
    item.set_relevance(ctx.completion_relevance())
 | 
					    item.set_relevance(ctx.completion_relevance())
 | 
				
			||||||
        .set_documentation(scope_def_docs(db, resolution))
 | 
					        .set_documentation(scope_def_docs(db, resolution))
 | 
				
			||||||
        .set_deprecated(scope_def_is_deprecated(&ctx, resolution));
 | 
					        .set_deprecated(scope_def_is_deprecated(&ctx, resolution));
 | 
				
			||||||
 | 
				
			|||||||
@ -96,7 +96,7 @@ fn render(
 | 
				
			|||||||
    item.set_documentation(ctx.docs(func))
 | 
					    item.set_documentation(ctx.docs(func))
 | 
				
			||||||
        .set_deprecated(ctx.is_deprecated(func) || ctx.is_deprecated_assoc_item(func))
 | 
					        .set_deprecated(ctx.is_deprecated(func) || ctx.is_deprecated_assoc_item(func))
 | 
				
			||||||
        .detail(detail(db, func))
 | 
					        .detail(detail(db, func))
 | 
				
			||||||
        .lookup_by(name.to_smol_str());
 | 
					        .lookup_by(name.unescaped().to_smol_str());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    match ctx.completion.config.snippet_cap {
 | 
					    match ctx.completion.config.snippet_cap {
 | 
				
			||||||
        Some(cap) => {
 | 
					        Some(cap) => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user