diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-05-03 16:25:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-03 16:25:08 +0200 |
| commit | d5809a8b3365dbecff4e31e10d8f8bb064232fb7 (patch) | |
| tree | 43d27e56435c3570beab9e2493b0cb8c357194c2 /src | |
| parent | 0784755127ab20dd6e710233768358c2f6821bbc (diff) | |
| parent | bbe7b85ef154dad5c7e17e7dc00895ec3bfcd189 (diff) | |
| download | rust-d5809a8b3365dbecff4e31e10d8f8bb064232fb7.tar.gz rust-d5809a8b3365dbecff4e31e10d8f8bb064232fb7.zip | |
Rollup merge of #60478 - euclio:doc-fixes, r=cramertj
minor compiler doc tweaks
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/hir/mod.rs | 3 | ||||
| -rw-r--r-- | src/librustc/lint/context.rs | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index 5a2807ac93d..4293019aed5 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -1927,6 +1927,9 @@ pub enum ArgSource { /// Represents the header (not the body) of a function declaration. #[derive(Clone, RustcEncodable, RustcDecodable, Debug, HashStable)] pub struct FnDecl { + /// The types of the function's arguments. + /// + /// Additional argument data is stored in the function's [body](Body::arguments). pub inputs: HirVec<Ty>, pub output: FunctionRetTy, pub c_variadic: bool, 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>, |
