mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
internal: Simplify
This commit is contained in:
parent
312ac83caf
commit
2642f64570
6 changed files with 75 additions and 94 deletions
|
@ -11,7 +11,7 @@ use crate::{
|
|||
intern::Interned,
|
||||
type_ref::{ConstScalarOrPath, LifetimeRef},
|
||||
};
|
||||
use hir_expand::name::{name, Name};
|
||||
use hir_expand::name::Name;
|
||||
use syntax::ast;
|
||||
|
||||
use crate::type_ref::{TypeBound, TypeRef};
|
||||
|
@ -134,9 +134,7 @@ impl Path {
|
|||
}
|
||||
|
||||
pub fn is_self_type(&self) -> bool {
|
||||
self.type_anchor.is_none()
|
||||
&& *self.generic_args == [None]
|
||||
&& self.mod_path.as_ident() == Some(&name!(Self))
|
||||
self.type_anchor.is_none() && *self.generic_args == [None] && self.mod_path.is_Self()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue