Skip to content

Commit d5809a8

Browse files
authored
Rollup merge of rust-lang#60478 - euclio:doc-fixes, r=cramertj
minor compiler doc tweaks
2 parents 0784755 + bbe7b85 commit d5809a8

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/librustc/hir/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1927,6 +1927,9 @@ pub enum ArgSource {
19271927
/// Represents the header (not the body) of a function declaration.
19281928
#[derive(Clone, RustcEncodable, RustcDecodable, Debug, HashStable)]
19291929
pub struct FnDecl {
1930+
/// The types of the function's arguments.
1931+
///
1932+
/// Additional argument data is stored in the function's [body](Body::arguments).
19301933
pub inputs: HirVec<Ty>,
19311934
pub output: FunctionRetTy,
19321935
pub c_variadic: bool,

src/librustc/lint/context.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)