mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-29 10:58:02 +00:00
Use Symbol in Name
This commit is contained in:
parent
843806b79f
commit
3fe815b0f3
75 changed files with 750 additions and 755 deletions
|
|
@ -1,6 +1,6 @@
|
|||
//! Completion of names from the current scope in expression position.
|
||||
|
||||
use hir::{ImportPathConfig, ScopeDef};
|
||||
use hir::{sym, ImportPathConfig, Name, ScopeDef};
|
||||
use syntax::ast;
|
||||
|
||||
use crate::{
|
||||
|
|
@ -190,7 +190,7 @@ pub(crate) fn complete_expr_path(
|
|||
path_ctx,
|
||||
strukt,
|
||||
None,
|
||||
Some(hir::known::SELF_TYPE),
|
||||
Some(Name::new_symbol_root(sym::Self_)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -210,7 +210,12 @@ pub(crate) fn complete_expr_path(
|
|||
|
||||
acc.add_union_literal(ctx, un, path, None);
|
||||
if complete_self {
|
||||
acc.add_union_literal(ctx, un, None, Some(hir::known::SELF_TYPE));
|
||||
acc.add_union_literal(
|
||||
ctx,
|
||||
un,
|
||||
None,
|
||||
Some(Name::new_symbol_root(sym::Self_)),
|
||||
);
|
||||
}
|
||||
}
|
||||
hir::Adt::Enum(e) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue