mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Add macros for known names and paths
This commit is contained in:
parent
169fe4932f
commit
259c42f00e
16 changed files with 185 additions and 166 deletions
|
@ -10,7 +10,7 @@ use hir_def::{
|
|||
resolver::resolver_for_expr,
|
||||
AdtId, ContainerId, Lookup, StructFieldId,
|
||||
};
|
||||
use hir_expand::name::{self, Name};
|
||||
use hir_expand::name::{Name, N};
|
||||
use ra_syntax::ast::RangeOp;
|
||||
|
||||
use crate::{
|
||||
|
@ -631,7 +631,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
|
|||
// Parent arguments are unknown, except for the receiver type
|
||||
if let Some(parent_generics) = def_generics.as_ref().map(|p| p.iter_parent()) {
|
||||
for (_id, param) in parent_generics {
|
||||
if param.name == name::SELF_TYPE {
|
||||
if param.name == N![Self] {
|
||||
substs.push(receiver_ty.clone());
|
||||
} else {
|
||||
substs.push(Ty::Unknown);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue