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
349
349
}
350
350
}
351
351
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
+ ///
352
356
/// Matches a `QPath` against a slice of segment string literals.
353
357
///
354
358
/// 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 {
376
380
}
377
381
}
378
382
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
+ ///
379
387
/// Matches a `Path` against a slice of segment string literals.
380
388
///
381
389
/// 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