Skip to content

Commit fcc109e

Browse files
Merge #7326
7326: Use `is_ident` when converting Path to an Identifier r=edwin0cheng a=kevaundray Co-authored-by: Kevaundray Wedderburn <kevtheappdev@gmail.com>
2 parents 9210f48 + da104bb commit fcc109e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/hir_def/src/path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl ModPath {
8787

8888
/// If this path is a single identifier, like `foo`, return its name.
8989
pub fn as_ident(&self) -> Option<&Name> {
90-
if self.kind != PathKind::Plain || self.segments.len() > 1 {
90+
if !self.is_ident() {
9191
return None;
9292
}
9393
self.segments.first()

0 commit comments

Comments
 (0)