File tree 1 file changed +8
-0
lines changed 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
348
348
}
349
349
}
350
350
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
+ ///
351
355
/// Matches a `QPath` against a slice of segment string literals.
352
356
///
353
357
/// 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 {
375
379
}
376
380
}
377
381
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
+ ///
378
386
/// Matches a `Path` against a slice of segment string literals.
379
387
///
380
388
/// 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