This commit is contained in:
Lukas Wirth 2022-03-05 23:53:24 +01:00
parent b454f11f38
commit 0bb631bf71
2 changed files with 6 additions and 9 deletions

View file

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