mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Make the result of Const, FunctionRender and TypeAliasRender constructors optional
They use source() which now returns an Option so they need to too.
This commit is contained in:
parent
3f1b3df65b
commit
7bfec89cf9
5 changed files with 17 additions and 20 deletions
|
@ -157,8 +157,7 @@ impl<'a> Render<'a> {
|
|||
|
||||
let kind = match resolution {
|
||||
ScopeDef::ModuleDef(Function(func)) => {
|
||||
let item = render_fn(self.ctx, import_to_add, Some(local_name), *func);
|
||||
return Some(item);
|
||||
return render_fn(self.ctx, import_to_add, Some(local_name), *func);
|
||||
}
|
||||
ScopeDef::ModuleDef(Variant(_))
|
||||
if self.ctx.completion.is_pat_binding_or_const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue