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 @@ -349,6 +349,10 @@ pub fn single_segment_path<'tcx>(path: &QPath<'tcx>) -> Option<&'tcx PathSegment
349349 }
350350}
351351
352+ /// THIS METHOD IS DEPRECATED and will eventually be removed since it does not match against the
353+ /// entire path or resolved `DefId`. Prefer using `match_def_path`. Consider getting a `DefId` from
354+ /// `QPath::Resolved.1.res.opt_def_id()`.
355+ ///
352356/// Matches a `QPath` against a slice of segment string literals.
353357///
354358/// There is also `match_path` if you are dealing with a `rustc_hir::Path` instead of a
@@ -376,6 +380,10 @@ pub fn match_qpath(path: &QPath<'_>, segments: &[&str]) -> bool {
376380 }
377381}
378382
383+ /// THIS METHOD IS DEPRECATED and will eventually be removed since it does not match against the
384+ /// entire path or resolved `DefId`. Prefer using `match_def_path`. Consider getting a `DefId` from
385+ /// `QPath::Resolved.1.res.opt_def_id()`.
386+ ///
379387/// Matches a `Path` against a slice of segment string literals.
380388///
381389/// 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