diff options
| author | Andy Russell <arussell123@gmail.com> | 2019-05-02 12:33:59 -0400 |
|---|---|---|
| committer | Andy Russell <arussell123@gmail.com> | 2019-05-02 15:52:27 -0400 |
| commit | 69fd757eca778cb3b83ccfc9fcfae4c6b839f8e6 (patch) | |
| tree | 10f498c1d81cd8fc2dee7625036776a6c6afaa60 /src | |
| parent | d15fc173818ccea6f8d97af13a30d454f9e4b35c (diff) | |
fix markdown syntax in `LateContext` examples
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/lint/context.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs index 8d5c1798e0f..e713cf8d805 100644 --- a/src/librustc/lint/context.rs +++ b/src/librustc/lint/context.rs @@ -757,12 +757,12 @@ impl<'a, 'tcx> LateContext<'a, 'tcx> { /// Check if a `DefId`'s path matches the given absolute type path usage. /// /// # Examples - /// ```rust,ignore (no `cx` or `def_id` available) + /// + /// ```rust,ignore (no context or def id available) /// if cx.match_def_path(def_id, &["core", "option", "Option"]) { /// // The given `def_id` is that of an `Option` type /// } /// ``` - // Uplifted from rust-lang/rust-clippy pub fn match_def_path(&self, def_id: DefId, path: &[&str]) -> bool { let names = self.get_def_path(def_id); @@ -772,13 +772,13 @@ impl<'a, 'tcx> LateContext<'a, 'tcx> { /// Gets the absolute path of `def_id` as a vector of `&str`. /// /// # Examples - /// ```rust,ignore (no `cx` or `def_id` available) + /// + /// ```rust,ignore (no context or def id available) /// let def_path = cx.get_def_path(def_id); /// if let &["core", "option", "Option"] = &def_path[..] { /// // The given `def_id` is that of an `Option` type /// } /// ``` - // Uplifted from rust-lang/rust-clippy pub fn get_def_path(&self, def_id: DefId) -> Vec<LocalInternedString> { pub struct AbsolutePathPrinter<'a, 'tcx> { pub tcx: TyCtxt<'a, 'tcx, 'tcx>, |
