@@ -757,12 +757,12 @@ impl<'a, 'tcx> LateContext<'a, 'tcx> {
757757 /// Check if a `DefId`'s path matches the given absolute type path usage.
758758 ///
759759 /// # Examples
760- /// ```rust,ignore (no `cx` or `def_id` available)
760+ ///
761+ /// ```rust,ignore (no context or def id available)
761762 /// if cx.match_def_path(def_id, &["core", "option", "Option"]) {
762763 /// // The given `def_id` is that of an `Option` type
763764 /// }
764765 /// ```
765- // Uplifted from rust-lang/rust-clippy
766766 pub fn match_def_path ( & self , def_id : DefId , path : & [ & str ] ) -> bool {
767767 let names = self . get_def_path ( def_id) ;
768768
@@ -772,13 +772,13 @@ impl<'a, 'tcx> LateContext<'a, 'tcx> {
772772 /// Gets the absolute path of `def_id` as a vector of `&str`.
773773 ///
774774 /// # Examples
775- /// ```rust,ignore (no `cx` or `def_id` available)
775+ ///
776+ /// ```rust,ignore (no context or def id available)
776777 /// let def_path = cx.get_def_path(def_id);
777778 /// if let &["core", "option", "Option"] = &def_path[..] {
778779 /// // The given `def_id` is that of an `Option` type
779780 /// }
780781 /// ```
781- // Uplifted from rust-lang/rust-clippy
782782 pub fn get_def_path ( & self , def_id : DefId ) -> Vec < LocalInternedString > {
783783 pub struct AbsolutePathPrinter < ' a , ' tcx > {
784784 pub tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
0 commit comments