We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8da6239 commit 6d04085Copy full SHA for 6d04085
compiler/rustc_lint/src/context.rs
@@ -710,6 +710,15 @@ impl<'tcx> LateContext<'tcx> {
710
711
/// Gets the absolute path of `def_id` as a vector of `Symbol`.
712
///
713
+ /// Note that this is kinda expensive because it has to
714
+ /// travel the tree and pretty-print. Use sparingly.
715
+ ///
716
+ /// If you're trying to match for an item given by its path, use a
717
+ /// diagnostic item. If you're only interested in given sections, use more
718
+ /// specific functions, such as [`TyCtxt::crate_name`]
719
720
+ /// FIXME: It would be great if this could be optimized.
721
722
/// # Examples
723
724
/// ```rust,ignore (no context or def id available)
0 commit comments