mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Constify KnownName's
This commit is contained in:
parent
1b38ca3b87
commit
012fec54dc
11 changed files with 75 additions and 157 deletions
|
@ -9,6 +9,7 @@ use ra_syntax::ast::{self, DefaultTypeParamOwner, NameOwner, TypeBoundsOwner, Ty
|
|||
|
||||
use crate::{
|
||||
db::{AstDatabase, DefDatabase, HirDatabase},
|
||||
name::SELF_TYPE,
|
||||
path::Path,
|
||||
type_ref::TypeRef,
|
||||
AdtDef, AsName, Container, Enum, EnumVariant, Function, HasSource, ImplBlock, Name, Struct,
|
||||
|
@ -83,7 +84,7 @@ impl GenericParams {
|
|||
// traits get the Self type as an implicit first type parameter
|
||||
generics.params.push(GenericParam {
|
||||
idx: start,
|
||||
name: Name::self_type(),
|
||||
name: SELF_TYPE,
|
||||
default: None,
|
||||
});
|
||||
generics.fill(&*it.source(db).ast, start + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue