mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Simplify
This commit is contained in:
parent
b454f11f38
commit
0bb631bf71
2 changed files with 6 additions and 9 deletions
|
@ -167,13 +167,10 @@ fn convert_path(
|
|||
}
|
||||
}
|
||||
ast::PathSegmentKind::SelfTypeKw => {
|
||||
let mut res = prefix.unwrap_or_else(|| {
|
||||
ModPath::from_kind(
|
||||
segment.coloncolon_token().map_or(PathKind::Plain, |_| PathKind::Abs),
|
||||
)
|
||||
});
|
||||
res.segments.push(known::SELF_TYPE);
|
||||
res
|
||||
if prefix.is_some() {
|
||||
return None;
|
||||
}
|
||||
ModPath::from_segments(PathKind::Plain, Some(known::SELF_TYPE))
|
||||
}
|
||||
ast::PathSegmentKind::CrateKw => {
|
||||
if prefix.is_some() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue