File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -348,6 +348,10 @@ pub fn single_segment_path<'tcx>(path: &QPath<'tcx>) -> Option<&'tcx PathSegment
348348 }
349349}
350350
351+ /// THIS METHOD IS DEPRECATED and will eventually be removed since it does not match against the
352+ /// entire path or resolved `DefId`. Prefer using `match_def_path`. Consider getting a `DefId` from
353+ /// `QPath::Resolved.1.res.opt_def_id()`.
354+ ///
351355/// Matches a `QPath` against a slice of segment string literals.
352356///
353357/// There is also `match_path` if you are dealing with a `rustc_hir::Path` instead of a
@@ -375,6 +379,10 @@ pub fn match_qpath(path: &QPath<'_>, segments: &[&str]) -> bool {
375379 }
376380}
377381
382+ /// THIS METHOD IS DEPRECATED and will eventually be removed since it does not match against the
383+ /// entire path or resolved `DefId`. Prefer using `match_def_path`. Consider getting a `DefId` from
384+ /// `QPath::Resolved.1.res.opt_def_id()`.
385+ ///
378386/// Matches a `Path` against a slice of segment string literals.
379387///
380388/// There is also `match_qpath` if you are dealing with a `rustc_hir::QPath` instead of a
You can’t perform that action at this time.
0 commit comments