diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2024-12-12 10:37:37 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-01-29 15:45:13 +0000 |
| commit | f47ad710595c1d87daa8f6b67045574c7304f83e (patch) | |
| tree | cdcc8016f15eb381ca34b4ace84e1b300d910949 /src/librustdoc/clean/utils.rs | |
| parent | ccc9ba5c30c675824e9ca62b960830ff4a1858ea (diff) | |
| download | rust-f47ad710595c1d87daa8f6b67045574c7304f83e.tar.gz rust-f47ad710595c1d87daa8f6b67045574c7304f83e.zip | |
Eliminate PatKind::Path
Diffstat (limited to 'src/librustdoc/clean/utils.rs')
| -rw-r--r-- | src/librustdoc/clean/utils.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/clean/utils.rs b/src/librustdoc/clean/utils.rs index 80dc6b7250c..77040aeb94d 100644 --- a/src/librustdoc/clean/utils.rs +++ b/src/librustdoc/clean/utils.rs @@ -303,7 +303,8 @@ pub(crate) fn name_from_pat(p: &hir::Pat<'_>) -> Symbol { return kw::Underscore; } PatKind::Binding(_, _, ident, _) => return ident.name, - PatKind::TupleStruct(ref p, ..) | PatKind::Path(ref p) => qpath_to_string(p), + PatKind::TupleStruct(ref p, ..) + | PatKind::Expr(PatExpr { kind: PatExprKind::Path(ref p), .. }) => qpath_to_string(p), PatKind::Or(pats) => { pats.iter().map(|p| name_from_pat(p).to_string()).collect::<Vec<String>>().join(" | ") } |
