Use Symbol in Name

This commit is contained in:
Lukas Wirth 2024-07-12 15:57:54 +02:00
parent 843806b79f
commit 3fe815b0f3
75 changed files with 750 additions and 755 deletions

View file

@ -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) => {